summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-11-14 00:02:29 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-11-14 00:02:29 +0100
commit80a9f21b76b936b2593b161774783dc2fff4872d (patch)
tree5c3010e3d06ef12301a9fc7fa572f95cb513f4d3 /editor/plugins/script_editor_plugin.cpp
parent59457685c18e2d729eea50c751c11f049a7186f0 (diff)
parentda55c06322b8cdab564331d56967a8d25d1072a0 (diff)
downloadredot-engine-80a9f21b76b936b2593b161774783dc2fff4872d.tar.gz
Merge pull request #84630 from KoBeWi/what_belongs_to_scene_saves_the_scene
Save scene when saving built-in resource
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 5ba0f46734..6c4636dba3 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2520,15 +2520,7 @@ void ScriptEditor::save_current_script() {
clear_docs_from_script(scr);
}
- if (resource->is_built_in()) {
- // If built-in script, save the scene instead.
- const String scene_path = resource->get_path().get_slice("::", 0);
- if (!scene_path.is_empty()) {
- EditorNode::get_singleton()->save_scene_if_open(scene_path);
- }
- } else {
- EditorNode::get_singleton()->save_resource(resource);
- }
+ EditorNode::get_singleton()->save_resource(resource);
if (scr.is_valid()) {
update_docs_from_script(scr);