Fix GetBitmapBundleDef when original image is smaller.

This commit is contained in:
Alex Shvartzkop
2026-01-01 21:32:40 +03:00
parent 74fa19e23b
commit c8b19372bc
+4 -6
View File
@@ -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 );