You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00: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