From 4b8e857f8877a1c02a83b6eb18e6528e2c8eb7e4 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 14 Mar 2008 06:06:27 +0000 Subject: [PATCH] fix for size 1x1 wxChoice when SetSelection() is called before realization, bug 1913657 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/choice.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index af2b1092fd..8f25aa9632 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -127,6 +127,13 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id, PostCreation(size); SetInitialSize(size); // need this too because this is a wxControlWithItems + // workaround for bug in gtk_option_menu_set_history(), it causes + // gtk_widget_size_allocate() to be called with the current + // widget->allocation values, which will be zero if a proper + // size_allocate has not occured yet + m_widget->allocation.width = m_width; + m_widget->allocation.height = m_height; + return true; } -- 2.47.2