]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/choice.cpp
corrected previous commit's wrongly applied patch
[wxWidgets.git] / src / gtk1 / choice.cpp
index 384f8b5d0048366b24c45f4d8736dff21b23c026..54f9b1de429bc3f67edbf1ae2f50881a0eaed2b8 100644 (file)
@@ -560,7 +560,11 @@ wxSize wxChoice::DoGetBestSize() const
     if ( ret.x < 80 )
         ret.x = 80;
 
-    ret.y = 16 + GetCharHeight();
+    // If this request_size is called with no entries then
+    // the returned height is wrong. Give it a reasonable
+    // default value.
+    if (ret.y <= 18)
+        ret.y = 8 + GetCharHeight();
 
     return ret;
 }