mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
Only auto size view columns once
This commit is contained in:
parent
cd935bb368
commit
3081d6256d
1 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in a new issue