git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51562
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
const wxSize &size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString &name = wxDialogNameStr );
- virtual ~wxDialog() {}
+ virtual ~wxDialog();
virtual bool Show( bool show = TRUE );
virtual int ShowModal();
bool ret = wxWindow::Show( show );
- if (show) InitDialog();
+ if (show)
+ InitDialog();
return ret;
}
+wxDialog::~wxDialog()
+{
+ m_isBeingDeleted = true;
+
+ // if the dialog is modal, this will end its event loop
+ Show(false);
+}
+
bool wxDialog::IsModal() const
{
return m_modalShowing;
wxDialog::~wxDialog()
{
m_isBeingDeleted = true;
+
+ // if the dialog is modal, this will end its event loop
Show(false);
}
{
m_isBeingDeleted = true;
+ // if the dialog is modal, this will end its event loop
+ Show(false);
+
delete m_eventLoop;
if (m_mainWidget)
if( !wxWindowBase::Show( show ) )
return false;
+ if ( !show && IsModal() )
+ EndModal(wxID_CANCEL);
+
m_isShown = show;
if (show)
wxDialog::~wxDialog()
{
+ m_isBeingDeleted = true;
+
+ // if the dialog is modal, this will end its event loop
+ Show(false);
+
delete m_eventLoop;
}