Put the page in the event for all event types

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-08-17 19:09:20 +00:00
parent af83019e94
commit 2365e5cbcf

View File

@@ -329,7 +329,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
if ( m_page ) if ( m_page )
{ {
// send the event to the old page // send the event to the old page
wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(), goingForward); wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(), goingForward, m_page);
if ( m_page->GetEventHandler()->ProcessEvent(event) && if ( m_page->GetEventHandler()->ProcessEvent(event) &&
!event.IsAllowed() ) !event.IsAllowed() )
{ {
@@ -400,7 +400,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
// nothing to do: the label was already correct // nothing to do: the label was already correct
// send the change event to the new page now // send the change event to the new page now
wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward); wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward, m_page);
(void)m_page->GetEventHandler()->ProcessEvent(event); (void)m_page->GetEventHandler()->ProcessEvent(event);
// and finally show it // and finally show it
@@ -442,7 +442,7 @@ void wxWizard::OnCancel(wxCommandEvent& WXUNUSED(event))
// page, but a small extra check won't hurt // page, but a small extra check won't hurt
wxWindow *win = m_page ? (wxWindow *)m_page : (wxWindow *)this; wxWindow *win = m_page ? (wxWindow *)m_page : (wxWindow *)this;
wxWizardEvent event(wxEVT_WIZARD_CANCEL, GetId()); wxWizardEvent event(wxEVT_WIZARD_CANCEL, GetId(), FALSE, m_page);
if ( !win->GetEventHandler()->ProcessEvent(event) || event.IsAllowed() ) if ( !win->GetEventHandler()->ProcessEvent(event) || event.IsAllowed() )
{ {
// no objections - close the dialog // no objections - close the dialog