]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/odcombo.cpp
Fix for always failing assert in GetValue. Save the same value that
[wxWidgets.git] / src / generic / odcombo.cpp
index 42e12d9e5f6c39d031515136d25a14066bf2087f..575641d93dc2e1b2e61e690ea4ace8f6ba34c7f8 100644 (file)
@@ -724,6 +724,8 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int
 {
     int height = 250;
 
+    maxHeight -= 2;  // Must take borders into account
+
     if ( m_strings.GetCount() )
     {
         if ( prefHeight > 0 )
@@ -743,8 +745,7 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int
             // NB: Calculations that take variable height into account
             //     are unnecessary.
             int fih = GetLineHeight(0);
-            int shown = height/fih;
-            height = shown * fih;
+            height -= height % fih;
         }
     }
     else