After changing the filter, scroll to the selected row
authorRené Stadler <mail@renestadler.de>
Fri, 30 Nov 2007 08:31:45 +0000 (10:31 +0200)
committerStefan Sauer <ensonic@users.sf.net>
Thu, 11 Sep 2014 18:51:41 +0000 (20:51 +0200)
debug-viewer/GstDebugViewer/GUI.py

index 0b65e41..8e27da9 100755 (executable)
@@ -1340,7 +1340,12 @@ class Window (object):
             pass
         else:
             sel = self.log_view.get_selection ()
-            sel.select_path ((select_index,))
+            path = (select_index,)
+            sel.select_path (path)
+
+            # FIXME: Instead of scrolling to the selected row, try to restore
+            # the previous visible range.
+            self.log_view.scroll_to_cell (path, use_align = True, row_align = .5)
 
     def handle_window_delete_event (self, window, event):