Fixed ISOProperties window crash. Please don't kill modals with Destroy() but with EndModal().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2020 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ac80c04eab
commit
7bc798b7f1
Source/Core/DolphinWX/Src
|
@ -644,8 +644,7 @@ void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
|
||||||
if (!iso)
|
if (!iso)
|
||||||
return;
|
return;
|
||||||
CISOProperties ISOProperties(iso->GetFileName(), this);
|
CISOProperties ISOProperties(iso->GetFileName(), this);
|
||||||
ISOProperties.ShowModal();
|
if(ISOProperties.ShowModal() == wxID_OK)
|
||||||
if (ISOProperties.bRefreshList)
|
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,14 +54,15 @@ END_EVENT_TABLE()
|
||||||
CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
OpenISO = DiscIO::CreateVolumeFromFilename(fileName);
|
OpenISO = DiscIO::CreateVolumeFromFilename(fileName);
|
||||||
pFileSystem = DiscIO::CreateFileSystem(OpenISO);
|
pFileSystem = DiscIO::CreateFileSystem(OpenISO);
|
||||||
|
|
||||||
pFileSystem->GetFileList(Our_Files);
|
pFileSystem->GetFileList(Our_Files);
|
||||||
|
|
||||||
GameListItem OpenISO_(fileName);
|
GameListItem OpenISO_(fileName);
|
||||||
|
|
||||||
bRefreshList = false;
|
bRefreshList = false;
|
||||||
|
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
|
|
||||||
GameIniFile = FULL_GAMECONFIG_DIR + (OpenISO->GetUniqueID()) + ".ini";
|
GameIniFile = FULL_GAMECONFIG_DIR + (OpenISO->GetUniqueID()) + ".ini";
|
||||||
|
@ -409,7 +410,7 @@ void CISOProperties::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
if (!SaveGameConfig())
|
if (!SaveGameConfig())
|
||||||
wxMessageBox(wxString::Format(_("Could not save %s"), GameIniFile.c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
wxMessageBox(wxString::Format(_("Could not save %s"), GameIniFile.c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
||||||
|
|
||||||
Destroy();
|
EndModal(bRefreshList ? wxID_OK : wxID_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CISOProperties::OnCloseClick(wxCommandEvent& WXUNUSED (event))
|
void CISOProperties::OnCloseClick(wxCommandEvent& WXUNUSED (event))
|
||||||
|
@ -492,7 +493,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
||||||
void CISOProperties::SetRefresh(wxCommandEvent& WXUNUSED (event))
|
void CISOProperties::SetRefresh(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
bRefreshList = true;
|
bRefreshList = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CISOProperties::LoadGameConfig()
|
void CISOProperties::LoadGameConfig()
|
||||||
|
@ -529,7 +530,7 @@ void CISOProperties::LoadGameConfig()
|
||||||
if (iTemp == -1)
|
if (iTemp == -1)
|
||||||
{
|
{
|
||||||
iTemp = 0;
|
iTemp = 0;
|
||||||
bRefreshList = true;
|
bRefreshList = true;
|
||||||
}
|
}
|
||||||
EmuState->SetSelection(iTemp);
|
EmuState->SetSelection(iTemp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue