summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2023-01-11 01:29:51 +0100
committerGitHub <noreply@github.com>2023-01-11 01:29:51 +0100
commit3e2843e3ad7b43940133ca0f67adf08f9da31a9b (patch)
tree9856da8e6db4d5327dc6a06e5f4217f4f9bc4af8 /editor
parentcbe3841a43586409b0c15e8e33bf2f989bf5f0c9 (diff)
parent42cbdbc7df9e71c0ad806c8e6321794a23d912ad (diff)
Merge pull request #71183 from YuriSizov/control-refresh-layouts-by-parents
Ensure that the cached layout mode is in sync
Diffstat (limited to 'editor')
-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());
}