mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-12-20 20:33:11 +01:00
Fix sandbox mode by connecting the terminal's signal
This commit is contained in:
parent
e974342693
commit
8198921b1a
3 changed files with 13 additions and 6 deletions
|
@ -69,12 +69,13 @@ func set_path(new_path):
|
|||
path = new_path
|
||||
if path_node:
|
||||
path_node.text = path
|
||||
shell.cd(new_path)
|
||||
for o in objects.values():
|
||||
o.queue_free()
|
||||
objects = {}
|
||||
if is_inside_tree():
|
||||
update_everything()
|
||||
if new_path != "":
|
||||
shell.cd(new_path)
|
||||
for o in objects.values():
|
||||
o.queue_free()
|
||||
objects = {}
|
||||
if is_inside_tree():
|
||||
update_everything()
|
||||
|
||||
func get_path():
|
||||
return path
|
||||
|
|
|
@ -26,3 +26,8 @@ func _ready():
|
|||
$Columns/Repository.path = path
|
||||
|
||||
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()
|
||||
|
|
|
@ -49,3 +49,4 @@ margin_left = 961.0
|
|||
margin_right = 1910.0
|
||||
margin_bottom = 1070.0
|
||||
size_flags_horizontal = 3
|
||||
[connection signal="command_done" from="Columns/Terminal" to="." method="update_repo"]
|
||||
|
|
Loading…
Reference in a new issue