summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorNeilKleistGao <neilkleistgao@bupt.edu.cn>2022-04-01 13:38:32 +0800
committerNeilKleistGao <neilkleistgao@bupt.edu.cn>2022-04-01 13:38:32 +0800
commitd8946a7111eed04404859d622c4c2056e1eef2ef (patch)
treed7257e9dcd387cd75768d482990c3e871d748b6a /scene/gui
parent51bbcbdec2f971ed0113992b34335ef3c9873e79 (diff)
Remove metadata `_edit_layout_mode` and `_edit_use_custom_anchors` if they have default values
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index d2d1b5e9b7..b8d285ded3 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);
}