X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef5c70f96f5e06e1c8f8119f51b99dd019583d2b..2c9fc05a460c447679979ccc25fc660989ef1bc8:/src/gtk/combobox.cpp diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 32123f67cc..936f383894 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -190,6 +190,9 @@ gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo ) if (!combo->m_hasVMT) return; + if (combo->GetSelection() == -1) + return; + wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() ); event.SetInt( combo->GetSelection() ); event.SetString( combo->GetStringSelection() ); @@ -375,7 +378,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, // gtk_widget_set_size_request( m_widget, setsize.x, setsize.y ); } - SetBestSize(size); // need this too because this is a wxControlWithItems + SetInitialSize(size); // need this too because this is a wxControlWithItems return true;