correct behavior in case it is still used with ShowModal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user