]> git.saurik.com Git - wxWidgets.git/commitdiff
Prevent bogus event which GTK 2.4 sends after
authorRobert Roebling <robert@roebling.de>
Fri, 13 Oct 2006 08:39:27 +0000 (08:39 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 13 Oct 2006 08:39:27 +0000 (08:39 +0000)
    typing text in the text area begins and the
    text there has no match in the list.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/combobox.cpp

index 32123f67cc985df473d1772921aa980cb3d97cfa..1f39a8f9ad47b04584e4301673327b793f88c562 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() );