mirror of https://github.com/PCSX2/pcsx2.git
linux: wx3.0: fix broken messagebox handling
Do not do additional processing on an event after EndModal is called. This fixes a message box bug on Linux wx3.0 builds. Without this fix, Release and Devel builds emit cancel signals even if 'Ok' or other buttons are pressed, and Debug builds trip an assertion with the message "EndModal called twice or ShowModal not called."
This commit is contained in:
parent
f3c0c1bb88
commit
d6d4a1a983
|
@ -298,10 +298,11 @@ ModalButtonPanel::ModalButtonPanel( wxWindow* parent, const MsgButtons& buttons
|
|||
|
||||
void ModalButtonPanel::OnActionButtonClicked( wxCommandEvent& evt )
|
||||
{
|
||||
evt.Skip();
|
||||
wxWindow* toplevel = wxGetTopLevelParent( this );
|
||||
if( wxDialog* dialog = wxDynamicCast( toplevel, wxDialog ) )
|
||||
dialog->EndModal( evt.GetId() );
|
||||
// If the dialog doesn't close, and you're using it for a modeless dialog - hint:
|
||||
// read the name of the class. ;)
|
||||
}
|
||||
|
||||
void ModalButtonPanel::AddCustomButton( wxWindowID id, const wxString& label )
|
||||
|
|
Loading…
Reference in New Issue