mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Fix strange visual bug with camera and external change.
This commit is contained in:
parent
e5b4ef8e95
commit
609559c074
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue