]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/wizard.cpp
Applied patch #840643 from Ian Brown with some modifications:
[wxWidgets.git] / src / generic / wizard.cpp
index 97da14ec8b9bccaed54b88caf9c7d557462e14a3..ef910605681120fbd94227ec6c22eaaa53693ec2 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;
     }
 
@@ -737,7 +738,7 @@ void wxWizard::OnWizEvent(wxWizardEvent& event)
 // our public interface
 // ----------------------------------------------------------------------------
 
-#ifdef WXWIN_COMPATIBILITY_2_2
+#if WXWIN_COMPATIBILITY_2_2
 
 /* static */
 wxWizard *wxWizardBase::Create(wxWindow *parent,