From 2207b90d2cd19809581b85e9ab204e5a220b91c8 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 20 Oct 2007 15:01:42 +0000 Subject: [PATCH] [ 1816882 ] wxListBox::SetSelection() doesn't update the control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/listbox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index ae64f2d557..d96a8c438b 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -895,6 +895,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; }