diff options
author | kobewi <kobewi4e@gmail.com> | 2021-06-06 23:58:35 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-06-06 23:58:35 +0200 |
commit | a97546d4eaab50dd0d0d28543b6dfcf87a0d0673 (patch) | |
tree | 750365d9544f9a194ec95f8bc77b612cfbb9af42 /editor/plugins | |
parent | cb8244273b0038595d8be6e0d56a430feac217f0 (diff) |
Don't save built-in script when adding method
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 4 |
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; } |