Merge pull request #5604 from sepalani/wx-rm-path

PathConfigPane: Prevent an invalid index assert
This commit is contained in:
Leo Lam 2017-06-14 13:30:15 +02:00 committed by GitHub
commit 40a9e585a7
2 changed files with 10 additions and 1 deletions

View File

@ -144,7 +144,14 @@ void PathConfigPane::BindEvents()
m_wii_sdcard_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnSdCardPathChanged,
this);
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreNotRunning);
Bind(wxEVT_UPDATE_UI, &PathConfigPane::OnEnableIfCoreNotRunning, this);
}
void PathConfigPane::OnEnableIfCoreNotRunning(wxUpdateUIEvent& event)
{
// Prevent the Remove button from being enabled via wxUpdateUIEvent
if (event.GetId() != m_remove_iso_path_button->GetId())
WxEventUtils::OnEnableIfCoreNotRunning(event);
}
void PathConfigPane::OnISOPathSelectionChanged(wxCommandEvent& event)

View File

@ -22,6 +22,8 @@ private:
void LoadGUIValues();
void BindEvents();
void OnEnableIfCoreNotRunning(wxUpdateUIEvent& event);
void OnISOPathSelectionChanged(wxCommandEvent&);
void OnRecursiveISOCheckBoxChanged(wxCommandEvent&);
void OnAddISOPath(wxCommandEvent&);