[GTKUI] Fix unselect error with treeview selection returning None
In standalone mode treeview.get_selection returns None resulting in an AttributeError for call to unselect_all.
This commit is contained in:
parent
fc9bc2976f
commit
c62c604418
|
@ -349,7 +349,8 @@ class TorrentView(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.get_selection().unselect_all()
|
if self.treeview.get_selection():
|
||||||
|
self.treeview.get_selection().unselect_all()
|
||||||
self.liststore.clear()
|
self.liststore.clear()
|
||||||
self.prev_status = {}
|
self.prev_status = {}
|
||||||
self.filter = None
|
self.filter = None
|
||||||
|
|
Loading…
Reference in New Issue