mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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:
@@ -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."""
|
||||||
|
|||||||
Reference in New Issue
Block a user