]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
Use font encoding
[wxWidgets.git] / src / gtk / combobox.cpp
index 32123f67cc985df473d1772921aa980cb3d97cfa..936f383894f0b5d74be07367d6bf19a8f75b2031 100644 (file)
@@ -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;