Declare wxBitmap in smaller scope in wxWizard DPI change handler

No real changes, just avoid creating wxBitmap unnecessarily and only do
it if we're really going to use it.
This commit is contained in:
Vadim Zeitlin 2022-05-30 17:36:23 +02:00
parent c3359c17b7
commit 1da8377f17

View File

@ -904,9 +904,9 @@ void wxWizard::SetBitmap(const wxBitmapBundle& bitmap)
void wxWizard::WXHandleDPIChanged(wxDPIChangedEvent& event) void wxWizard::WXHandleDPIChanged(wxDPIChangedEvent& event)
{ {
wxBitmap bmp;
if ( m_statbmp ) if ( m_statbmp )
{ {
wxBitmap bmp;
if ( m_page ) if ( m_page )
bmp = m_page->GetBitmap(); bmp = m_page->GetBitmap();
if ( !bmp.IsOk() ) if ( !bmp.IsOk() )