DolphinWX: Propagate event to refresh the game list

Prior to this refactor, certain options would cause the game list to refresh when the config modal dialog is closed (such as adding a folder to the path list). This restores that functionality.
This commit is contained in:
Lioncash
2015-03-18 20:33:20 -04:00
parent febd3909c6
commit b459a8ec61
4 changed files with 22 additions and 7 deletions

View File

@ -19,6 +19,7 @@
#include "DolphinWX/Frame.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Config/ConfigMain.h"
#include "DolphinWX/Config/PathConfigPane.h"
PathConfigPane::PathConfigPane(wxWindow* panel, wxWindowID id)
@ -118,7 +119,7 @@ void PathConfigPane::OnRecursiveISOCheckBoxChanged(wxCommandEvent& event)
{
SConfig::GetInstance().m_RecursiveISOFolder = m_recursive_iso_paths_checkbox->IsChecked();
// TODO: Fire an event back to ConfigMain, setting bRefreshList to true.
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
}
void PathConfigPane::OnAddISOPath(wxCommandEvent& event)
@ -134,7 +135,7 @@ void PathConfigPane::OnAddISOPath(wxCommandEvent& event)
}
else
{
// TODO: Send event back to ConfigMain setting bRefreshList to true.
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
m_iso_paths_listbox->Append(dialog.GetPath());
}
}
@ -144,7 +145,7 @@ void PathConfigPane::OnAddISOPath(wxCommandEvent& event)
void PathConfigPane::OnRemoveISOPath(wxCommandEvent& event)
{
// TODO: Set event back to ConfigMain to set bRefreshList to true.
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
m_iso_paths_listbox->Delete(m_iso_paths_listbox->GetSelection());
// This seems to not be activated on Windows when it should be. wxw bug?