Fix GetBitmapBundleDef when original image is smaller.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user