PathConfigPane: Prevent an invalid index assert
This commit is contained in:
parent
9b8feb8e60
commit
2a349f8e49
|
@ -144,7 +144,14 @@ void PathConfigPane::BindEvents()
|
||||||
m_wii_sdcard_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnSdCardPathChanged,
|
m_wii_sdcard_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnSdCardPathChanged,
|
||||||
this);
|
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)
|
void PathConfigPane::OnISOPathSelectionChanged(wxCommandEvent& event)
|
||||||
|
|
|
@ -22,6 +22,8 @@ private:
|
||||||
void LoadGUIValues();
|
void LoadGUIValues();
|
||||||
void BindEvents();
|
void BindEvents();
|
||||||
|
|
||||||
|
void OnEnableIfCoreNotRunning(wxUpdateUIEvent& event);
|
||||||
|
|
||||||
void OnISOPathSelectionChanged(wxCommandEvent&);
|
void OnISOPathSelectionChanged(wxCommandEvent&);
|
||||||
void OnRecursiveISOCheckBoxChanged(wxCommandEvent&);
|
void OnRecursiveISOCheckBoxChanged(wxCommandEvent&);
|
||||||
void OnAddISOPath(wxCommandEvent&);
|
void OnAddISOPath(wxCommandEvent&);
|
||||||
|
|
Loading…
Reference in New Issue