// generic wxWizard implementation
// ----------------------------------------------------------------------------
+#if wxCHECK_VERSION(2, 7, 0)
+ #error "Fix wxGTK vs. wxMSW difference other way"
+#else
+ WX_DEFINE_ARRAY_PTR(wxWizard *, wxModelessWizards);
+ wxModelessWizards modelessWizards;
+#endif
+
void wxWizard::Init()
{
m_posWizard = wxDefaultPosition;
m_calledSetBorder = false;
m_border = 0;
m_started = false;
+ modelessWizards.Add(this);
}
bool wxWizard::Create(wxWindow *parent,
// can't return false here because there is no old page
(void)ShowPage(firstPage, true /* forward */);
+ modelessWizards.Remove(this);
+
return ShowModal() == wxID_OK;
}
}
}
- if ( !IsModal() &&
+ if ( ( modelessWizards.Index(this) != wxNOT_FOUND ) &&
event.IsAllowed() &&
( event.GetEventType() == wxEVT_WIZARD_FINISHED ||
event.GetEventType() == wxEVT_WIZARD_CANCEL
)
)
{
+ modelessWizards.Remove(this);
Destroy();
}
}