X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3e8c656ca6262a395ac8a9b5df93873dd01a9e6..15cae9eb9e277bcc3c63b3c5c20defe981660c79:/src/generic/wizard.cpp?ds=sidebyside diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index cd9c3152d0..c57773d6ce 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -280,7 +280,7 @@ void wxWizard::SetPageSize(const wxSize& size) m_sizePage = size; } -void wxWizard::Fit(const wxWizardPage *page) +void wxWizard::FitToPage(const wxWizardPage *page) { // otherwise it will have no effect now as it's too late... wxASSERT_MSG( !WasCreated(), _T("should be called before RunWizard()!") ); @@ -359,15 +359,9 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) return TRUE; } - // send the change event to the new page now - wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward); - (void)m_page->GetEventHandler()->ProcessEvent(event); - // position and show the new page (void)m_page->TransferDataToWindow(); m_page->SetSize(m_x, m_y, m_width, m_height); - m_page->Show(); - m_page->SetFocus(); // check if bitmap needs to be updated // update default flag as well @@ -405,6 +399,14 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) } // nothing to do: the label was already correct + // send the change event to the new page now + wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward); + (void)m_page->GetEventHandler()->ProcessEvent(event); + + // and finally show it + m_page->Show(); + m_page->SetFocus(); + return TRUE; }