mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-23 14:51:50 +03:00
Expand default target directory (if you Open/Save from a New file)
This commit is contained in:
parent
4e1f11ab23
commit
6fae6e501e
@ -49,6 +49,11 @@ class EnhancedDirectoryTree(DirectoryTree):
|
|||||||
else:
|
else:
|
||||||
# print("scrolling", node)
|
# print("scrolling", node)
|
||||||
_go_to_node(node)
|
_go_to_node(node)
|
||||||
|
# If the target path is a directory, expand it.
|
||||||
|
# This might not always be desired, for a general API,
|
||||||
|
# but for File > New, File > Open, it should expand the current directory.
|
||||||
|
if node.data.path.is_dir():
|
||||||
|
_add_to_load_queue(node)
|
||||||
return node
|
return node
|
||||||
node.add = add.__get__(node, type(node))
|
node.add = add.__get__(node, type(node))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user