summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-05-02 12:28:43 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2017-05-02 12:40:20 +0100
commita86b6f0f8f072d32aa98e6e5a7eb76d73e655174 (patch)
treef113aa9e6674a3a564ef712c5323151cd0a5cf03
parent3dfe6af1eeeecbab6691a71faf5989584d64cb2f (diff)
downloaddeluge-a86b6f0f8f072d32aa98e6e5a7eb76d73e655174.zip
deluge-a86b6f0f8f072d32aa98e6e5a7eb76d73e655174.tar.gz
deluge-a86b6f0f8f072d32aa98e6e5a7eb76d73e655174.tar.bz2
[GTKUI] Fix column sort state not saved in Thinclient mode
* In torrentview.stop the listview is cleared however this meant in thinclient mode that listview sort details are empty and overwrites existing data when save_state is then called in torrentview.shutdown.
-rw-r--r--deluge/ui/gtkui/torrentview.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
index 64dfbc0..6befddb 100644
--- a/deluge/ui/gtkui/torrentview.py
+++ b/deluge/ui/gtkui/torrentview.py
@@ -361,13 +361,15 @@ class TorrentView(listview.ListView, component.Component):
def stop(self):
"""Stops the torrentview"""
- # We need to clear the liststore
+ # Save column state before clearing liststore
+ # so column sort details are correctly saved.
+ self.save_state()
self.liststore.clear()
self.prev_status = {}
def shutdown(self):
"""Called when GtkUi is exiting"""
- self.save_state()
+ pass
def save_state(self):
"""