X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4a11fe85cb632368ba8426204598806460b7679..d4159b2d18bc4d1610769d639648b23f3ab8d0dc:/src/gtk/listbox.cpp diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index b4fa72e371..faec2bf664 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -768,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; }