From f168f7e18e35e3ca078328986be301262654a5f2 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 4 Jan 2009 08:47:26 +0000 Subject: [PATCH] Fix seeding torrents from moving around when sorting the '#' column --- ChangeLog | 1 + deluge/ui/gtkui/listview.py | 7 ------- deluge/ui/gtkui/torrentview.py | 3 ++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index caf80eeff..1e22bed16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Deluge 1.1.0_RC3 (In Development) GtkUI: * Fix folder renaming to display the change properly + * Fix seeding torrents from moving around when sorting the '#' column Plugins: * Label: Fix move on completed diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index 452e72210..5a284d133 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -161,23 +161,16 @@ class ListView: """create new filter-model must be called after listview.create_new_liststore """ - sort_column = None - if self.model_filter: - # Save the liststore filter column - sort_column = self.model_filter.get_sort_column_id() model_filter = self.liststore.filter_new() model_filter.set_visible_column( self.columns["filter"].column_indices[0]) self.model_filter = gtk.TreeModelSort(model_filter) self.set_sort_functions() self.treeview.set_model(self.model_filter) - if sort_column and sort_column != (None, None): - self.model_filter.set_sort_column_id(*sort_column) def set_sort_functions(self): for column in self.columns.values(): if column.sort_func: - log.debug("sort_func: %s sort_id: %s", column.sort_func, column.sort_id) self.model_filter.set_sort_func( column.sort_id, column.sort_func, diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index 0871cffed..839d1c602 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -279,10 +279,11 @@ class TorrentView(listview.ListView, component.Component): if not torrent_id in status.keys(): row[filter_column] = False else: + row[filter_column] = True if torrent_id in self.prev_status and status[torrent_id] == self.prev_status[torrent_id]: # The status dict is the same, so do not update continue - row[filter_column] = True + # Set values for each column in the row for column in self.columns_to_update: column_index = self.get_column_index(column)