correct behavior in case it is still used with ShowModal

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2013-11-26 12:53:13 +00:00
parent 5af1e63c16
commit 7957dc7b2f

View File

@@ -277,16 +277,24 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event) void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
{ {
Destroy(); // safeguards in case the window is still shown using ShowModal
if ( !IsModal() )
Destroy();
event.Skip(); event.Skip();
} }
void wxGenericAboutDialog::OnOK(wxCommandEvent& WXUNUSED(event)) void wxGenericAboutDialog::OnOK(wxCommandEvent& event)
{ {
// By default a modeless dialog would be just hidden, destroy this one // safeguards in case the window is still shown using ShowModal
// instead. if ( !IsModal() )
Destroy(); {
// By default a modeless dialog would be just hidden, destroy this one
// instead.
Destroy();
}
else
event.Skip();
} }
#endif // !wxUSE_MODAL_ABOUT_DIALOG #endif // !wxUSE_MODAL_ABOUT_DIALOG