summaryrefslogtreecommitdiff
path: root/editor/plugins/control_editor_plugin.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-01-10 23:07:57 +0300
committerYuri Sizov <yuris@humnom.net>2023-01-10 23:51:27 +0300
commit42cbdbc7df9e71c0ad806c8e6321794a23d912ad (patch)
treefc70c5e9be0f722c933e9cb102f9e76804f5722a /editor/plugins/control_editor_plugin.cpp
parent91713ced81792b10fdc9367b7f355738e5d52777 (diff)
Ensure that the cached layout mode is in sync
Diffstat (limited to 'editor/plugins/control_editor_plugin.cpp')
-rw-r--r--editor/plugins/control_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index 0fff16bf24..ad3e861b79 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -727,6 +727,7 @@ void ControlEditorToolbar::_anchors_preset_selected(int p_preset) {
for (Node *E : selection) {
Control *control = Object::cast_to<Control>(E);
if (control) {
+ undo_redo->add_do_property(control, "layout_mode", LayoutMode::LAYOUT_MODE_ANCHORS);
undo_redo->add_do_property(control, "anchors_preset", preset);
undo_redo->add_undo_method(control, "_edit_set_state", control->_edit_get_state());
}