summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-06-07 09:25:57 +0200
committerGitHub <noreply@github.com>2021-06-07 09:25:57 +0200
commit553d4a8ba64dbd217a2ae4a656cd7c47c6c759df (patch)
tree8885fc0d6f553b761c8bd1ce2822c10be65b73dc
parent34fc33d192150675050071d952f8601601563f31 (diff)
parenta97546d4eaab50dd0d0d28543b6dfcf87a0d0673 (diff)
Merge pull request #49372 from KoBeWi/do_not_save_do_not_save_do_not_save
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 156b7782ef..4b7faec228 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2451,7 +2451,9 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
script_list->select(script_list->find_metadata(i));
// Save the current script so the changes can be picked up by an external editor.
- save_current_script();
+ if (!_is_built_in_script(script.ptr())) { // But only if it's not built-in script.
+ save_current_script();
+ }
break;
}