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:
bendikro 2012-11-30 09:22:44 +01:00
parent ca272bb36a
commit 7492d48029
1 changed files with 4 additions and 3 deletions

View File

@ -307,6 +307,7 @@ class ListView:
position = index position = index
break break
sort = None sort = None
if self.model_filter:
sort_id, order = self.model_filter.get_sort_column_id() sort_id, order = self.model_filter.get_sort_column_id()
if self.get_column_name(sort_id) == column.get_title(): if self.get_column_name(sort_id) == column.get_title():
sort = sort_id sort = sort_id