mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix seeding torrents from moving around when sorting the '#' column
This commit is contained in:
parent
923cfaab5c
commit
f168f7e18e
3 changed files with 3 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue