Added test if self.model_filter is None
self.model_filter will be None if no list was ever loaded in the Client, so listview.create_column_state would fail.
This commit is contained in:
parent
ca272bb36a
commit
7492d48029
|
@ -307,9 +307,10 @@ class ListView:
|
||||||
position = index
|
position = index
|
||||||
break
|
break
|
||||||
sort = None
|
sort = None
|
||||||
sort_id, order = self.model_filter.get_sort_column_id()
|
if self.model_filter:
|
||||||
if self.get_column_name(sort_id) == column.get_title():
|
sort_id, order = self.model_filter.get_sort_column_id()
|
||||||
sort = sort_id
|
if self.get_column_name(sort_id) == column.get_title():
|
||||||
|
sort = sort_id
|
||||||
|
|
||||||
return ListViewColumnState(column.get_title(), position,
|
return ListViewColumnState(column.get_title(), position,
|
||||||
column.get_width(), column.get_visible(),
|
column.get_width(), column.get_visible(),
|
||||||
|
|
Loading…
Reference in New Issue