diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-26 14:05:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-26 14:05:56 +0200 |
commit | 5700429e4edca4ba90a406976ac3e8b337a50eb8 (patch) | |
tree | 182556e73f95ccc32ca4ea839a737d2d9db9448d /modules/visual_script | |
parent | 42d320beca9c33f8bd54392296be2d133d671e9e (diff) | |
parent | ccff2f2551c5749e1c7d2976222013f582d767b1 (diff) |
Merge pull request #33760 from nekomatata/script-editor-init-optimization
Optimized ScriptEditor initialization when many scripts are loaded
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 5 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 2fcd9332a1..a1c7dca9d2 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2513,6 +2513,8 @@ RES VisualScriptEditor::get_edited_resource() const { } void VisualScriptEditor::set_edited_resource(const RES &p_res) { + ERR_FAIL_COND(script.is_valid()); + ERR_FAIL_COND(p_res.is_null()); script = p_res; signal_editor->script = script; signal_editor->undo_redo = undo_redo; @@ -2533,6 +2535,9 @@ void VisualScriptEditor::set_edited_resource(const RES &p_res) { _update_members(); } +void VisualScriptEditor::enable_editor() { +} + Vector<String> VisualScriptEditor::get_functions() { return Vector<String>(); } diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index e59618e120..0c5665cee8 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -294,6 +294,7 @@ public: virtual void apply_code() override; virtual RES get_edited_resource() const override; virtual void set_edited_resource(const RES &p_res) override; + virtual void enable_editor() override; virtual Vector<String> get_functions() override; virtual void reload_text() override; virtual String get_name() override; |