1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Ensure that the cached layout mode is in sync

This commit is contained in:
Yuri Sizov
2023-01-10 23:07:57 +03:00
parent 91713ced81
commit 42cbdbc7df
3 changed files with 12 additions and 0 deletions

View File

@@ -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());
}