]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
fix typo (missing closing brackets); add some comments to wxKeyCode; no real change
[wxWidgets.git] / src / msw / dialog.cpp
index 7b4ad2baaa387e59cacc7acbbd5fe7ad17e9188f..55bd004088e09c714de08b0ffa72fc15d5b4b32f 100644 (file)
@@ -147,7 +147,6 @@ void wxDialog::Init()
 {
     m_isShown = false;
     m_modalData = NULL;
-    m_endModalCalled = false;
 #if wxUSE_TOOLBAR && defined(__POCKETPC__)
     m_dialogToolBar = NULL;
 #endif
@@ -193,8 +192,6 @@ bool wxDialog::Create(wxWindow *parent,
 
 wxDialog::~wxDialog()
 {
-    m_isBeingDeleted = true;
-
     // this will also reenable all the other windows for a modal dialog
     Show(false);
 
@@ -281,14 +278,11 @@ int wxDialog::ShowModal()
 {
     wxASSERT_MSG( !IsModal(), _T("ShowModal() can't be called twice") );
 
-    m_endModalCalled = false;
-
     Show();
 
     // EndModal may have been called from InitDialog handler (called from
-    // inside Show()), which would cause an infinite loop if we didn't take it
-    // into account
-    if ( !m_endModalCalled )
+    // inside Show()) and hidden the dialog back again
+    if ( IsShown() )
     {
         // enter and run the modal loop
         wxDialogModalDataTiedPtr modalData(&m_modalData,
@@ -303,7 +297,6 @@ void wxDialog::EndModal(int retCode)
 {
     wxASSERT_MSG( IsModal(), _T("EndModal() called for non modal dialog") );
 
-    m_endModalCalled = true;
     SetReturnCode(retCode);
 
     Hide();