From ddd5387387e8af9a38eff1a516687a698a71b2b7 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 13 Oct 2006 08:39:27 +0000 Subject: [PATCH] Prevent bogus event which GTK 2.4 sends after 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 32123f67cc..1f39a8f9ad 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() ); -- 2.45.2