From c91aeed0a80f9a240071b87b449b962e5fa0a0e7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 4 Aug 2008 15:33:13 +0000 Subject: [PATCH] Allow small widths when setting initial strings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/choice.cpp | 2 +- src/gtk/combobox.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index bcce43a4d1..4bd4629552 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -588,7 +588,7 @@ wxSize wxChoice::DoGetBestSize() const } // but not less than the minimal width - if ( ret.x < 80 ) + if ( GetCount() == 0 && ret.x < 80 ) ret.x = 80; // If this request_size is called with no entries then diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index ba38afe937..bf52e0dde5 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -1365,7 +1365,7 @@ wxSize wxComboBox::DoGetBestSize() const } // empty combobox should have some reasonable default size too - if ( ret.x < 100 ) + if ( GetCount() == 0 && ret.x < 100 ) ret.x = 100; CacheBestSize(ret);