]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
Applied (part of) small patch from Chris Bogolte which
[wxWidgets.git] / src / gtk1 / combobox.cpp
index 557d3e1b5dab71cae59a5b56d92edb17f29ae689..fc3754d399d9a3065795ff03bbb4b291e4352a7e 100644 (file)
@@ -54,18 +54,18 @@ gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(wi
 
     int curSelection = combo->GetSelection();
 
-    if (combo->m_prevSelection != curSelection)
-    {
-        GtkWidget *list = GTK_COMBO(combo->m_widget)->list;
-        gtk_list_unselect_item( GTK_LIST(list), combo->m_prevSelection );
-    }
+    if (combo->m_prevSelection == curSelection) return;
+
+    GtkWidget *list = GTK_COMBO(combo->m_widget)->list;
+    gtk_list_unselect_item( GTK_LIST(list), combo->m_prevSelection );
+    
     combo->m_prevSelection = curSelection;
 
     wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
     event.SetInt( curSelection );
     event.SetString( combo->GetStringSelection() );
     event.SetEventObject( combo );
-
+    
     combo->GetEventHandler()->ProcessEvent( event );
 }