]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
Rewrote wxSound:
[wxWidgets.git] / src / gtk1 / combobox.cpp
index 557d3e1b5dab71cae59a5b56d92edb17f29ae689..ab4f7bead8dac46ed627e8b2146d85f7ba9f19a6 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 );
 }
 
@@ -733,6 +733,7 @@ void wxComboBox::OnSize( wxSizeEvent &event )
 void wxComboBox::DoApplyWidgetStyle(GtkRcStyle *style)
 {
 //    gtk_widget_modify_style( GTK_COMBO(m_widget)->button, syle );
+
     gtk_widget_modify_style( GTK_COMBO(m_widget)->entry, style );
     gtk_widget_modify_style( GTK_COMBO(m_widget)->list, style );