[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,14 +350,14 @@ class TorrentView(listview.ListView, component.Component):
def shutdown(self): def shutdown(self):
"""Called when GtkUi is exiting""" """Called when GtkUi is exiting"""
if self.window.visible(): self.save_state()
self.save_state()
def save_state(self): def save_state(self):
""" """
Saves the state of the torrent view. Saves the state of the torrent view.
""" """
listview.ListView.save_state(self, "torrentview.state") if self.window.visible():
listview.ListView.save_state(self, "torrentview.state")
def remove_column(self, header): def remove_column(self, header):
"""Removes the column with the name 'header' from the torrentview""" """Removes the column with the name 'header' from the torrentview"""