From 82d4f005d3ead38d2d07d3504d35f8ddbc83e73a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2014 22:18:52 +0000 Subject: [PATCH] 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. --- src/msw/bmpcbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp index 469ddace63..7cf13208b6 100644 --- a/src/msw/bmpcbox.cpp +++ b/src/msw/bmpcbox.cpp @@ -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); }