]> git.saurik.com Git - wxWidgets.git/commitdiff
* Use wxTopLevelWindow::Show() for modeless dialogs
authorDavid Elliott <dfe@tgwbd.org>
Tue, 2 Sep 2003 13:00:28 +0000 (13:00 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Tue, 2 Sep 2003 13:00:28 +0000 (13:00 +0000)
* Maintain m_isShown for modal dialogs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/dialog.mm

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