From df2dc1097e8c05f1b58def5c4e507353379c7d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Wed, 29 Jun 2022 17:27:16 +0300 Subject: [PATCH] clean current file and tree item references when regenerating tree --- ServerUI.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ServerUI.gd b/ServerUI.gd index 7fb0e40..fd56430 100644 --- a/ServerUI.gd +++ b/ServerUI.gd @@ -100,6 +100,9 @@ func set_server_dir(dir: String) -> void: func _reconstruct_tree_from_working_files() -> void: + current_file = null + current_tree_selection = null + file_tree.clear() var root: TreeItem = file_tree.create_item() root.set_text(0, "Server files")