Fix repainting in case of tree building exception

This commit is contained in:
RumovZ 2021-03-07 09:47:17 +01:00
parent cce1b1f702
commit 23777eed67

View file

@ -428,6 +428,7 @@ class SidebarTreeView(QTreeView):
return return
def on_done(fut: Future) -> None: def on_done(fut: Future) -> None:
self.setUpdatesEnabled(True)
root = fut.result() root = fut.result()
model = SidebarModel(self, root) model = SidebarModel(self, root)
@ -439,7 +440,6 @@ class SidebarTreeView(QTreeView):
self.search_for(self.current_search) self.search_for(self.current_search)
else: else:
self._expand_where_necessary(model) self._expand_where_necessary(model)
self.setUpdatesEnabled(True)
if is_current: if is_current:
self.restore_current(is_current) self.restore_current(is_current)