Applied patch [ 642162 ] restore wxWizard wxEVT_WIZARD_FINISHED
Restore the wxWizard wxEVT_WIZARD_FINISHED event, which was sent when the FINISHED button was pressed and the wizard was finished. When the wxWizard is modal this event is not needed. However, when the wizard is non-modal this is the only way to determine that the wizard has finished. Scott Pleiter git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,6 +57,7 @@ WX_DEFINE_ARRAY(wxPanel *, wxArrayPages);
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_CANCEL)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_FINISHED)
|
||||
DEFINE_EVENT_TYPE(wxEVT_WIZARD_HELP)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxWizard, wxDialog)
|
||||
@@ -68,6 +69,7 @@ BEGIN_EVENT_TABLE(wxWizard, wxDialog)
|
||||
EVT_WIZARD_PAGE_CHANGED(-1, wxWizard::OnWizEvent)
|
||||
EVT_WIZARD_PAGE_CHANGING(-1, wxWizard::OnWizEvent)
|
||||
EVT_WIZARD_CANCEL(-1, wxWizard::OnWizEvent)
|
||||
EVT_WIZARD_FINISHED(-1, wxWizard::OnWizEvent)
|
||||
EVT_WIZARD_HELP(-1, wxWizard::OnWizEvent)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@@ -365,6 +367,11 @@ 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);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user