- // change the bitmap if necessary (and if we have it at all)
- int bmpIsDefault = !m_page->GetBitmap().Ok();
- if ( m_statbmp && (bmpIsDefault != bmpWasDefault) )
+ // check if bitmap needs to be updated
+ // update default flag as well
+ if(m_page->GetBitmap().Ok())
+ {
+ ThisBitmap = m_page->GetBitmap();
+ bmpIsDefault = FALSE;
+ }
+
+ // change the bitmap if:
+ // 1) a default bitmap was selected in constructor
+ // 2) this page was constructed with a bitmap
+ // 3) this bitmap is not the previous bitmap
+ if( m_statbmp && (ThisBitmap != PreviousBitmap) )