]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/wizard.cpp
adjusting to changes in xti.h
[wxWidgets.git] / src / generic / wizard.cpp
index 97da14ec8b9bccaed54b88caf9c7d557462e14a3..532315b1f8ca930648ac75a3dcb312b4885edd86 100644 (file)
@@ -532,11 +532,12 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
     {
         // terminate successfully
         EndModal(wxID_OK);
-        if ( !IsModal() )
-         {
-           wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(),FALSE, 0);
-           (void)GetEventHandler()->ProcessEvent(event);
-         }
+
+        // and notify the user code (this is especially useful for modeless
+        // wizards)
+        wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(), FALSE, 0);
+        (void)GetEventHandler()->ProcessEvent(event);
+
         return TRUE;
     }