From 5dab17df890bc6e9b508e6e900545b0989e25121 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 2 Apr 2010 12:46:18 -0700 Subject: [PATCH] Fix #1210 save sort column order in files tab -- patch from squisher --- deluge/ui/gtkui/files_tab.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index f81820bad..bc1bdcd43 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -230,8 +230,8 @@ class FilesTab(Tab): # Setup state dict state = { "columns": {}, - "sort_id": column_id, - "sort_order": int(sort_order) if sort_order else None + "sort_id": int(column_id) if column_id >= 0 else None, + "sort_order": int(sort_order) if sort_order >= 0 else None } for index, column in enumerate(self.listview.get_columns()): @@ -268,7 +268,7 @@ class FilesTab(Tab): if state == None: return - if state["sort_id"] and state["sort_order"] is not None: + if state["sort_id"] is not None and state["sort_order"] is not None: self.treestore.set_sort_column_id(state["sort_id"], state["sort_order"]) for (index, column) in enumerate(self.listview.get_columns()):