From 5cef7fe9fc695866a857951230ea091026f3e92c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 16 Jan 2009 03:01:41 +0000 Subject: [PATCH] Fix remembering sorted column in the torrent list --- deluge/ui/gtkui/listview.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index 63cc6bf54..446785b07 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -164,8 +164,14 @@ class ListView: model_filter = self.liststore.filter_new() model_filter.set_visible_column( self.columns["filter"].column_indices[0]) + sort_info = None + if self.model_filter: + sort_info = self.model_filter.get_sort_column_id() + self.model_filter = gtk.TreeModelSort(model_filter) - self.set_sort_functions() + if sort_info and sort_info[0] and sort_info[1] > -1: + self.model_filter.set_sort_column_id(sort_info[0], sort_info[1]) + #self.set_sort_functions() self.treeview.set_model(self.model_filter) def set_sort_functions(self):