[GTKUI] Only save_state when mainwindow is visible

* A similar fix (550ddc01) was applied to develop so backporting to guard
   against similar problems with columns not saving properly.
This commit is contained in:
Calum Lind 2015-11-30 23:38:58 +00:00
parent 1bdc99ded7
commit e65a7ff2ea
1 changed files with 3 additions and 3 deletions

View File

@ -350,13 +350,13 @@ class TorrentView(listview.ListView, component.Component):
def shutdown(self):
"""Called when GtkUi is exiting"""
if self.window.visible():
self.save_state()
def save_state(self):
"""
Saves the state of the torrent view.
"""
if self.window.visible():
listview.ListView.save_state(self, "torrentview.state")
def remove_column(self, header):