Set up the job tracking before setting the path

Setting the path to anything other than "." is going to result in a reset
happening, so we need the tracking support in place first.
This commit is contained in:
Dave Pearson
2023-05-11 09:10:55 +01:00
parent df0f73ba3b
commit 4ead43c149

View File

@@ -128,9 +128,9 @@ class DirectoryTree(Tree[DirEntry]):
classes=classes, classes=classes,
disabled=disabled, disabled=disabled,
) )
self.path = path
self._waiting_load_jobs: Queue[TreeNode[DirEntry]] = Queue() self._waiting_load_jobs: Queue[TreeNode[DirEntry]] = Queue()
self._running_load_jobs: set[int] = set() self._running_load_jobs: set[int] = set()
self.path = path
def reload(self) -> None: def reload(self) -> None:
"""Reload the `DirectoryTree` contents.""" """Reload the `DirectoryTree` contents."""