From ddea73e0a7c413a3b24382b6e1ed1aafadada7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Santilio?= Date: Sun, 18 Oct 2020 18:27:22 +0200 Subject: [PATCH 1/2] update cfg to 1.7.8 --- addons/file-editor/plugin.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/file-editor/plugin.cfg b/addons/file-editor/plugin.cfg index c622640..bddb650 100644 --- a/addons/file-editor/plugin.cfg +++ b/addons/file-editor/plugin.cfg @@ -3,5 +3,5 @@ name="File Editor" description="An internal file editor to view and edit text files in your project folder." author="Nicolo 'fenix' Santilio" -version="1.7.7" +version="1.7.8" script="scripts/file-editor.gd" From c9250fa9896df104dd803bdda441d2f56debcb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Santilio?= Date: Sun, 18 Oct 2020 18:29:04 +0200 Subject: [PATCH 2/2] bugfix error for project launch - `editor_plugin` var available only inside function - plugin loaded only when in editor --- addons/file-editor/scripts/FileEditor.gd | 3 ++- addons/file-editor/scripts/LastOpenedFiles.gd | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/file-editor/scripts/FileEditor.gd b/addons/file-editor/scripts/FileEditor.gd index f907a95..280f8ff 100644 --- a/addons/file-editor/scripts/FileEditor.gd +++ b/addons/file-editor/scripts/FileEditor.gd @@ -67,6 +67,8 @@ var current_csv_editor : Control var current_font : DynamicFont func _ready(): + if not Engine.is_editor_hint(): + return clean_editor() update_version() connect_signals() @@ -167,7 +169,6 @@ func update_version(): if err == OK: plugin_version = config.get_value("plugin","version") Version.set_text("v"+plugin_version) - print(plugin_version) func create_selected_file(): update_list() diff --git a/addons/file-editor/scripts/LastOpenedFiles.gd b/addons/file-editor/scripts/LastOpenedFiles.gd index aca2e5f..dcf5c86 100644 --- a/addons/file-editor/scripts/LastOpenedFiles.gd +++ b/addons/file-editor/scripts/LastOpenedFiles.gd @@ -3,7 +3,6 @@ extends Node const lastopenedfile_path : String = "res://addons/file-editor/lastopenedfiles.lastcfg" -var editor_plugin : EditorPlugin = EditorPlugin.new() func _ready(): pass @@ -44,4 +43,5 @@ func store_editor_fonts(file_name : String, font_path : String): file.save(lastopenedfile_path) func get_editor_font(): + var editor_plugin : EditorPlugin = EditorPlugin.new() return editor_plugin.get_editor_interface().get_editor_settings().get_setting("interface/editor/code_font")