From d866fd1fe8a2f13b19909b036ca6015ceb47933f Mon Sep 17 00:00:00 2001 From: ChaoticByte Date: Fri, 21 Jun 2024 10:38:31 +0200 Subject: [PATCH] Get content for Save from code_editor.text instead of Globals.shader.code - fixes #6 --- src/Editor.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Editor.gd b/src/Editor.gd index bd4efd5..a22d5c8 100644 --- a/src/Editor.gd +++ b/src/Editor.gd @@ -236,7 +236,7 @@ func _on_open_shader_dialog_file_selected(path: String): func _on_save_shader_dialog_file_selected(path): print("Save ", path) var file = FileAccess.open(path, FileAccess.WRITE) - var content = Globals.shader.code + var content = code_editor.text file.store_string(content) if "/" in path: # update current working directory Globals.cwd = path.substr(0, path.rfind("/"))