# HG changeset patch # User Pantxo Diribarne # Date 1441127157 -7200 # Node ID 7d8ec197b08bd558f19ebbc24ca66e23c3c02e22 # Parent 4c2e76cbdc7dc3872a7bd3ef0ae3ce22d4aa6558 Scroll list view to display selection (bug #45848) * LisboxControl.cc (updateSelection, ListBoxControl::ListBoxControl): scroll to item after selection. diff -r 4c2e76cbdc7d -r 7d8ec197b08b libgui/graphics/ListBoxControl.cc --- a/libgui/graphics/ListBoxControl.cc Tue Sep 01 08:07:57 2015 -0700 +++ b/libgui/graphics/ListBoxControl.cc Tue Sep 01 19:05:57 2015 +0200 @@ -48,6 +48,7 @@ if (1 <= idx && idx <= lc) { list->item (idx-1)->setSelected (true); + list->scrollToItem (list->item (idx-1)); if (i == 0 && list->selectionMode () == QAbstractItemView::SingleSelection) break; @@ -100,6 +101,7 @@ if (1 <= idx && idx <= lc) { list->item (idx-1)->setSelected (true); + list->scrollToItem (list->item (idx-1)); if (i == 0 && (list->selectionMode () == QAbstractItemView::SingleSelection)) break;