Measure wxBitmapComboBox height correctly if it has images.

This fixes a regression introduced in 45e216b (see #14279):
wxBitmapComboBox must be higher than a normal wxComboBox if it has big
enough bitmaps. Closes #16690.

This is the backport of 7e869a5 from master.
This commit is contained in:
Vadim Zeitlin
2014-12-05 22:18:52 +00:00
committed by Dimitri Schoolwerth
parent 52975d72fd
commit 82d4f005d3

View File

@@ -449,9 +449,9 @@ bool wxBitmapComboBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
LPMEASUREITEMSTRUCT lpMeasureItem = (LPMEASUREITEMSTRUCT) item;
int pos = lpMeasureItem->itemID;
// Measure item height if item list is not empty,
// Measure edit field height if item list is not empty,
// otherwise leave default system value.
if ( pos >= 0 )
if ( m_usedImgSize.y >= 0 || pos >= 0 )
{
lpMeasureItem->itemHeight = wxBitmapComboBoxBase::MeasureItem(pos);
}