From 42cbdbc7df9e71c0ad806c8e6321794a23d912ad Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Tue, 10 Jan 2023 23:07:57 +0300 Subject: Ensure that the cached layout mode is in sync --- editor/plugins/control_editor_plugin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'editor/plugins/control_editor_plugin.cpp') 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(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()); } -- cgit v1.2.3