diff options
author | kobewi <kobewi4e@gmail.com> | 2021-11-06 14:32:14 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-11-09 21:58:06 +0100 |
commit | 75e8eafa72f9ba518b12313684926c7ebffb4bd5 (patch) | |
tree | a3b3a85f3420157c5ecc4fd3946b1a43dd2a01cc /editor/plugins | |
parent | efea3128c3b0d026a20efaf6bd46058c2b732519 (diff) |
Properly reload built-in tool scripts
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 3f233b3d58..000dfe8bda 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1015,6 +1015,11 @@ void ScriptEditor::_scene_saved_callback(const String &p_path) { if (edited_res->get_path().get_slice("::", 0) == p_path) { se->tag_saved_version(); } + + Ref<Script> scr = edited_res; + if (scr.is_valid() && scr->is_tool()) { + scr->reload(true); + } } } |