diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/control.cpp | 3 | ||||
-rw-r--r-- | scene/multiplayer/scene_replication_interface.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 4f2f853be9..59cb097b34 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1508,7 +1508,8 @@ void Control::_set_layout_mode(LayoutMode p_mode) { set_meta("_edit_layout_mode", (int)p_mode); if (p_mode == LayoutMode::LAYOUT_MODE_POSITION) { - set_meta("_edit_use_custom_anchors", false); + remove_meta("_edit_layout_mode"); + remove_meta("_edit_use_custom_anchors"); set_anchors_and_offsets_preset(LayoutPreset::PRESET_TOP_LEFT, LayoutPresetMode::PRESET_MODE_KEEP_SIZE); set_grow_direction_preset(LayoutPreset::PRESET_TOP_LEFT); } diff --git a/scene/multiplayer/scene_replication_interface.cpp b/scene/multiplayer/scene_replication_interface.cpp index 0764f136e4..2952512462 100644 --- a/scene/multiplayer/scene_replication_interface.cpp +++ b/scene/multiplayer/scene_replication_interface.cpp @@ -309,6 +309,9 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p Error err = rep_state->peer_del_remote(p_from, net_id, &node); ERR_FAIL_COND_V(err != OK, err); ERR_FAIL_COND_V(!node, ERR_BUG); + if (node->get_parent() != nullptr) { + node->get_parent()->remove_child(node); + } node->queue_delete(); return OK; } |