* Use wxTopLevelWindow::Show() for modeless dialogs

* Maintain m_isShown for modal dialogs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2003-09-02 13:00:28 +00:00
parent cbb2499e71
commit 0411b8647b

View File

@@ -105,10 +105,13 @@ void wxDialog::SetModal(bool flag)
bool wxDialog::Show(bool show) bool wxDialog::Show(bool show)
{ {
if(m_isShown == show)
return false;
if(show) if(show)
InitDialog(); InitDialog();
if(IsModal()) if(IsModal())
{ {
m_isShown = show;
if(show) if(show)
{ {
wxAutoNSAutoreleasePool pool; wxAutoNSAutoreleasePool pool;
@@ -124,6 +127,8 @@ bool wxDialog::Show(bool show)
wxModalDialogs.DeleteObject(this); wxModalDialogs.DeleteObject(this);
} }
} }
else
return wxTopLevelWindow::Show(show);
return true; return true;
} }