mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Merge pull request #90317 from ajreckof/Fix-strange-visual-bug-with-camera-and-external-change-
Fix strange visual bug with camera and external change.
This commit is contained in:
commit
7fa4698475
@ -722,6 +722,7 @@ bool EditorData::check_and_update_scene(int p_idx) {
|
||||
|
||||
new_scene->set_scene_file_path(edited_scene[p_idx].root->get_scene_file_path());
|
||||
Node *old_root = edited_scene[p_idx].root;
|
||||
edited_scene.write[p_idx].root = new_scene;
|
||||
old_root->replace_by(new_scene, false, false);
|
||||
memdelete(old_root);
|
||||
edited_scene.write[p_idx].selection = new_selection;
|
||||
|
@ -3674,7 +3674,9 @@ void EditorNode::set_edited_scene(Node *p_scene) {
|
||||
if (old_edited_scene_root->get_parent() == scene_root) {
|
||||
scene_root->remove_child(old_edited_scene_root);
|
||||
}
|
||||
old_edited_scene_root->disconnect(SNAME("replacing_by"), callable_mp(this, &EditorNode::set_edited_scene));
|
||||
if (old_edited_scene_root->is_connected("replacing_by", callable_mp(this, &EditorNode::set_edited_scene))) {
|
||||
old_edited_scene_root->disconnect(SNAME("replacing_by"), callable_mp(this, &EditorNode::set_edited_scene));
|
||||
}
|
||||
}
|
||||
get_editor_data().set_edited_scene_root(p_scene);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user