Fix names of scenes dropped onto viewport

This commit is contained in:
kobewi 2022-01-05 13:11:18 +01:00
parent 2c7fcdd7f9
commit 77eb25421e
2 changed files with 2 additions and 2 deletions

View File

@ -5852,7 +5852,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene);
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene, true);
editor_data->get_undo_redo().add_do_method(instantiated_scene, "set_owner", editor->get_edited_scene());
editor_data->get_undo_redo().add_do_reference(instantiated_scene);
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instantiated_scene);

View File

@ -4127,7 +4127,7 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
}
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene);
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene, true);
editor_data->get_undo_redo().add_do_method(instantiated_scene, "set_owner", editor->get_edited_scene());
editor_data->get_undo_redo().add_do_reference(instantiated_scene);
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instantiated_scene);