Fix sandbox mode by connecting the terminal's signal

This commit is contained in:
Sebastian Morr 2020-10-01 10:07:36 +02:00
parent e974342693
commit 8198921b1a
3 changed files with 13 additions and 6 deletions

View file

@ -69,12 +69,13 @@ func set_path(new_path):
path = new_path path = new_path
if path_node: if path_node:
path_node.text = path path_node.text = path
shell.cd(new_path) if new_path != "":
for o in objects.values(): shell.cd(new_path)
o.queue_free() for o in objects.values():
objects = {} o.queue_free()
if is_inside_tree(): objects = {}
update_everything() if is_inside_tree():
update_everything()
func get_path(): func get_path():
return path return path

View file

@ -26,3 +26,8 @@ func _ready():
$Columns/Repository.path = path $Columns/Repository.path = path
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, Vector2(1920, 1080), 1.5) get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, Vector2(1920, 1080), 1.5)
$Columns/Terminal.repository = $Columns/Repository
func update_repo():
$Columns/Repository.update_everything()

View file

@ -49,3 +49,4 @@ margin_left = 961.0
margin_right = 1910.0 margin_right = 1910.0
margin_bottom = 1070.0 margin_bottom = 1070.0
size_flags_horizontal = 3 size_flags_horizontal = 3
[connection signal="command_done" from="Columns/Terminal" to="." method="update_repo"]