From 3081d6256d436d75e7784c2d3d4f6ad3c40d0a4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Stadler?= Date: Thu, 29 Nov 2007 16:21:38 +0200 Subject: [PATCH] Only auto size view columns once --- debug-viewer/GstDebugViewer/GUI.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/debug-viewer/GstDebugViewer/GUI.py b/debug-viewer/GstDebugViewer/GUI.py index f07f562..1d0f916 100755 --- a/debug-viewer/GstDebugViewer/GUI.py +++ b/debug-viewer/GstDebugViewer/GUI.py @@ -951,6 +951,8 @@ class ViewColumnManager (ColumnManager): ColumnManager.attach (self) + self.columns_sized = False + def detach (self): self.state.column_order = self.column_order @@ -986,12 +988,16 @@ class ViewColumnManager (ColumnManager): def __handle_notify_model (self, view, gparam): + if self.columns_sized: + # Already sized. + return model = self.view.props.model - self.logger.debug ("model changed: %r", model) if model is None: return + self.logger.debug ("model changed, sizing columns") for column in self.iter_items (): self.size_column (column, view, model) + self.columns_sized = True class LineViewLogModel (FilteredLogModel): -- 2.7.4