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
This commit is contained in:
@@ -227,7 +227,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
|||||||
bool btnLabelWasNext = TRUE;
|
bool btnLabelWasNext = TRUE;
|
||||||
|
|
||||||
// and this tells us whether we already had the default bitmap before
|
// and this tells us whether we already had the default bitmap before
|
||||||
bool bmpWasDefault = TRUE;
|
int bmpWasDefault;
|
||||||
|
|
||||||
if ( m_page )
|
if ( m_page )
|
||||||
{
|
{
|
||||||
@@ -245,6 +245,11 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
|||||||
btnLabelWasNext = m_page->GetNext() != (wxWizardPage *)NULL;
|
btnLabelWasNext = m_page->GetNext() != (wxWizardPage *)NULL;
|
||||||
bmpWasDefault = !m_page->GetBitmap().Ok();
|
bmpWasDefault = !m_page->GetBitmap().Ok();
|
||||||
}
|
}
|
||||||
|
else // no previous page
|
||||||
|
{
|
||||||
|
// always set the bitmap
|
||||||
|
bmpWasDefault = -1;
|
||||||
|
}
|
||||||
|
|
||||||
// set the new one
|
// set the new one
|
||||||
m_page = page;
|
m_page = page;
|
||||||
@@ -268,7 +273,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
|
|||||||
m_page->Show();
|
m_page->Show();
|
||||||
|
|
||||||
// change the bitmap if necessary (and if we have it at all)
|
// 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) )
|
if ( m_statbmp && (bmpIsDefault != bmpWasDefault) )
|
||||||
{
|
{
|
||||||
wxBitmap bmp;
|
wxBitmap bmp;
|
||||||
|
Reference in New Issue
Block a user