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:
Maarten Bent
2018-05-17 19:44:38 +02:00
parent e581b72955
commit 5758832a6e

View File

@@ -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++ )
{