Fix #804383 (TypeError when deleting all saved searches)

This commit is contained in:
Kovid Goyal 2011-07-01 09:54:42 -06:00
parent d76f1ee48a
commit f0bf205fea

View File

@ -575,7 +575,9 @@ class TagsView(QTreeView): # {{{
expanded_categories, state_map = self.get_state()
self._model.rebuild_node_tree(state_map=state_map)
for category in expanded_categories:
self.expand(self._model.index_for_category(category))
idx = self._model.index_for_category(category)
if idx is not None and idx.isValid():
self.expand(idx)
self.show_item_at_path(path)
def show_item_at_path(self, path, box=False,