Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Disable play and record buttons if an iso was selected, but is later …
…deselected.
  • Loading branch information
RachelBryk committed Feb 7, 2013
1 parent 6bc9e75 commit 0ebe35e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/Core/DolphinWX/Src/GameListCtrl.cpp
Expand Up @@ -57,6 +57,8 @@ size_t CGameListCtrl::m_numberItem = 0;
std::string CGameListCtrl::m_currentFilename;
bool sorted = false;

extern CFrame* main_frame;

static int CompareGameListItems(const GameListItem* iso1, const GameListItem* iso2,
long sortData = CGameListCtrl::COLUMN_TITLE)
{
Expand Down Expand Up @@ -373,7 +375,8 @@ void CGameListCtrl::Update()
SetItemFont(index, *wxITALIC_FONT);
SetColumnWidth(0, wxLIST_AUTOSIZE);
}

if (GetSelectedISO() == NULL)
main_frame->UpdateGUI();
Show();

AutomaticColumnWidth();
Expand Down Expand Up @@ -975,7 +978,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
{
long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (item == wxNOT_FOUND)
return new GameListItem(""); // TODO: wtf is this
return NULL;
else
{
// Here is a little workaround for multiselections:
Expand Down

0 comments on commit 0ebe35e

Please sign in to comment.