summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-09 23:00:35 +0100
committerGitHub <noreply@github.com>2021-11-09 23:00:35 +0100
commit284b50cf30a939dfee91876e06895aa50940c37c (patch)
tree9db58cfe33dc3efc492c578c47dee259afb1fd90
parent06a33e590f029d4d96e32df62f3c3961e1c33e4e (diff)
parent75e8eafa72f9ba518b12313684926c7ebffb4bd5 (diff)
Merge pull request #54662 from KoBeWi/now_with_reloading
Properly reload built-in tool scripts
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
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);
+ }
}
}