Fix invalid image size in wxBitmapComboBox widgets sample
When the wxBitmapComboBox is empty, GetBitmapSize() returns size -1,-1. Images can not be scaled to this invalid size. Use the size of the imagelist instead.
This commit is contained in:
@@ -694,6 +694,8 @@ void BitmapComboBoxWidgetsPage::LoadWidgetImages( wxArrayString* strings, wxImag
|
||||
|
||||
// Get size of existing images in list
|
||||
wxSize foundSize = m_combobox->GetBitmapSize();
|
||||
if ( !foundSize.IsFullySpecified() )
|
||||
foundSize = images->GetSize();
|
||||
|
||||
for ( i=0; i<strings->size(); i++ )
|
||||
{
|
||||
|
Reference in New Issue
Block a user