From fab31075c77a149e42c935be72733b037bb27350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Fri, 30 Nov 2007 10:21:38 +0200 Subject: [PATCH] Retain bottom view model and fix crash after filter change --- debug-viewer/GstDebugViewer/GUI.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/debug-viewer/GstDebugViewer/GUI.py b/debug-viewer/GstDebugViewer/GUI.py index 978d589269..0b65e4156a 100755 --- a/debug-viewer/GstDebugViewer/GUI.py +++ b/debug-viewer/GstDebugViewer/GUI.py @@ -1118,13 +1118,16 @@ class LineView (object): self.line_view.connect ("row-activated", self.handle_line_view_row_activated) self.log_view = log_view = window.log_view - log_view.connect ("notify::model", self.handle_log_view_notify_model) log_view.connect ("row-activated", self.handle_log_view_row_activated) sel = log_view.get_selection () sel.connect ("changed", self.handle_log_view_selection_changed) self.column_manager.attach (window) + def handle_attach_log_file (self, window): + + self.line_view.props.model = LineViewLogModel (window.log_model) + def handle_line_view_row_activated (self, view, path, column): line_index = path[0] @@ -1135,16 +1138,6 @@ class LineView (object): sel = self.log_view.get_selection () sel.select_path (path) - def handle_log_view_notify_model (self, view, gparam): - - log_model = view.props.model - - if log_model is None: - return - - line_model = LineViewLogModel (log_model) - self.line_view.props.model = line_model - def handle_log_view_row_activated (self, view, path, column): log_filter = view.props.model @@ -1604,6 +1597,7 @@ class Window (object): def idle_set (): self.log_view.props.model = self.log_filter + self.line_view.handle_attach_log_file (self) for feature in self.features: feature.handle_attach_log_file (self, self.log_file) if len (self.log_filter):