mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Save scene when saving built-in resource
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user