From: David Elliott Date: Tue, 2 Sep 2003 13:00:28 +0000 (+0000) Subject: * Use wxTopLevelWindow::Show() for modeless dialogs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0411b8647ba9c4928a3e009d1ac732f8d8a751c2 * 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 --- diff --git a/src/cocoa/dialog.mm b/src/cocoa/dialog.mm index 635487ceeb..a2c3612bf5 100644 --- a/src/cocoa/dialog.mm +++ b/src/cocoa/dialog.mm @@ -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; }