]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for custom bitmap setting for the first page
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jul 2001 12:29:02 +0000 (12:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jul 2001 12:29:02 +0000 (12:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/wizard.cpp

index e515042bec56b2e5fb11de31530827cad0e15206..acc1f274e70101a8bd557e714820e91d42f103d9 100644 (file)
@@ -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;