From dee5b92f9cd0d48b59620f25f98d5450ba9a5da7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 19 Jul 2001 12:29:02 +0000 Subject: [PATCH] fix for custom bitmap setting for the first page git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/wizard.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index e515042bec..acc1f274e7 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -227,7 +227,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) bool btnLabelWasNext = TRUE; // and this tells us whether we already had the default bitmap before - bool bmpWasDefault = TRUE; + int bmpWasDefault; if ( m_page ) { @@ -245,6 +245,11 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) btnLabelWasNext = m_page->GetNext() != (wxWizardPage *)NULL; bmpWasDefault = !m_page->GetBitmap().Ok(); } + else // no previous page + { + // always set the bitmap + bmpWasDefault = -1; + } // set the new one m_page = page; @@ -268,7 +273,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) m_page->Show(); // change the bitmap if necessary (and if we have it at all) - bool bmpIsDefault = !m_page->GetBitmap().Ok(); + int bmpIsDefault = !m_page->GetBitmap().Ok(); if ( m_statbmp && (bmpIsDefault != bmpWasDefault) ) { wxBitmap bmp; -- 2.45.2