Merge pull request #59185 from NeilKleistGao/master

This commit is contained in:
Hugo Locurcio 2022-05-05 16:41:39 +02:00 committed by GitHub
commit b6e9314564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1508,7 +1508,8 @@ void Control::_set_layout_mode(LayoutMode p_mode) {
set_meta("_edit_layout_mode", (int)p_mode); set_meta("_edit_layout_mode", (int)p_mode);
if (p_mode == LayoutMode::LAYOUT_MODE_POSITION) { 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_anchors_and_offsets_preset(LayoutPreset::PRESET_TOP_LEFT, LayoutPresetMode::PRESET_MODE_KEEP_SIZE);
set_grow_direction_preset(LayoutPreset::PRESET_TOP_LEFT); set_grow_direction_preset(LayoutPreset::PRESET_TOP_LEFT);
} }