]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
making things compile and build again ...
[wxWidgets.git] / src / gtk / listbox.cpp
index b3f4a76682c27c727145c74817bae8a2afc8a8e5..faec2bf664df7cb8b75957ccb519f60fa3328530 100644 (file)
@@ -483,9 +483,6 @@ int wxListBox::DoInsertItems(const wxArrayStringsAdapter& items,
         g_object_unref (entry);
     }
 
-    if ( !HasClientData() )
-        m_clientDataItemsType = type;
-
     return pos + numItems - 1;
 }
 
@@ -771,6 +768,13 @@ void wxListBox::GtkSetSelection(int n, const bool select, const bool blockEvent)
         gtk_tree_selection_select_iter(selection, &iter);
     else
         gtk_tree_selection_unselect_iter(selection, &iter);
+        
+    GtkTreePath* path = gtk_tree_model_get_path(
+                        GTK_TREE_MODEL(m_liststore), &iter);
+
+    gtk_tree_view_scroll_to_cell(m_treeview, path, NULL, FALSE, 0.0f, 0.0f);
+
+    gtk_tree_path_free(path);
 
     m_blockEvent = false;
 }