mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-01 11:30:43 +00:00
Fix seeding torrents from moving around when sorting the '#' column
This commit is contained in:
parent
dc17647590
commit
5c839a6b20
@ -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…
x
Reference in New Issue
Block a user