Only auto size view columns once
This commit is contained in:
parent
cd935bb368
commit
3081d6256d
@ -951,6 +951,8 @@ class ViewColumnManager (ColumnManager):
|
|||||||
|
|
||||||
ColumnManager.attach (self)
|
ColumnManager.attach (self)
|
||||||
|
|
||||||
|
self.columns_sized = False
|
||||||
|
|
||||||
def detach (self):
|
def detach (self):
|
||||||
|
|
||||||
self.state.column_order = self.column_order
|
self.state.column_order = self.column_order
|
||||||
@ -986,12 +988,16 @@ class ViewColumnManager (ColumnManager):
|
|||||||
|
|
||||||
def __handle_notify_model (self, view, gparam):
|
def __handle_notify_model (self, view, gparam):
|
||||||
|
|
||||||
|
if self.columns_sized:
|
||||||
|
# Already sized.
|
||||||
|
return
|
||||||
model = self.view.props.model
|
model = self.view.props.model
|
||||||
self.logger.debug ("model changed: %r", model)
|
|
||||||
if model is None:
|
if model is None:
|
||||||
return
|
return
|
||||||
|
self.logger.debug ("model changed, sizing columns")
|
||||||
for column in self.iter_items ():
|
for column in self.iter_items ():
|
||||||
self.size_column (column, view, model)
|
self.size_column (column, view, model)
|
||||||
|
self.columns_sized = True
|
||||||
|
|
||||||
class LineViewLogModel (FilteredLogModel):
|
class LineViewLogModel (FilteredLogModel):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user