From c8b19372bc8da2cd179b8a73e25126594652be44 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Thu, 1 Jan 2026 21:32:35 +0300 Subject: [PATCH] Fix GetBitmapBundleDef when original image is smaller. --- common/bitmap_store.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/bitmap_store.cpp b/common/bitmap_store.cpp index 3d73110bb5..c0dbc2b64a 100644 --- a/common/bitmap_store.cpp +++ b/common/bitmap_store.cpp @@ -182,24 +182,22 @@ wxBitmapBundle BITMAP_STORE::GetBitmapBundleDef( BITMAPS aBitmapId, int aDefHeig if( info.theme != m_theme ) continue; - if( aDefHeight > 0 && info.height < aDefHeight ) - continue; + wxImage img = getImage( info.id, info.height ); if( info.height == aDefHeight ) hasDefSize = true; - wxImage img = getImage( info.id, info.height ); - if( info.height > largestHeight ) { largestHeight = info.height; largestImage = img; } - bmps.push_back( wxBitmap( img ) ); + if( info.height >= aDefHeight ) + bmps.push_back( wxBitmap( img ) ); } - if( aDefHeight > 0 && !hasDefSize ) + if( !hasDefSize ) bmps.push_back( wxBitmap( resampleImage( largestImage, aDefHeight, aDefHeight ) ) ); return wxBitmapBundle::FromBitmaps( bmps );