Fix bug introduced on previous commit. We need to get a selection first!

This commit is contained in:
Pedro Algarvio 2011-06-06 19:46:02 +01:00
parent 66e8b34a54
commit 3397c2487b

View File

@ -450,7 +450,7 @@ class TorrentView(listview.ListView, component.Component):
def stop(self): def stop(self):
"""Stops the torrentview""" """Stops the torrentview"""
# We need to clear the liststore # We need to clear the liststore
self.treeview.unselect_all() self.treeview.get_selection().unselect_all()
self.liststore.clear() self.liststore.clear()
self.prev_status = {} self.prev_status = {}
self.filter = None self.filter = None
@ -473,7 +473,7 @@ class TorrentView(listview.ListView, component.Component):
see: core.get_torrents_status see: core.get_torrents_status
""" """
self.treeview.unselect_all() self.treeview.get_selection().unselect_all()
search_filter = self.filter and self.filter.get('name', None) or None search_filter = self.filter and self.filter.get('name', None) or None
self.filter = dict(filter_dict) #copied version of filter_dict. self.filter = dict(filter_dict) #copied version of filter_dict.
if search_filter and 'name' not in filter_dict: if search_filter and 'name' not in filter_dict: