mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
Save scene when saving built-in resource
This commit is contained in:
parent
59457685c1
commit
da55c06322
2 changed files with 10 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue