diff options
author | kobewi <kobewi4e@gmail.com> | 2022-04-01 20:30:23 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-05-06 00:27:10 +0200 |
commit | 1dc7bcc83c81b32c3651f3fa869055a0cce22085 (patch) | |
tree | d08d774fa53fc3368b13a23c0c3b5a9cd6327d57 /scene/gui/control.cpp | |
parent | 066692b6d081f1577bc0ebcd84da204339218ec6 (diff) |
Cleanup metadata usage
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 59cb097b34..dddeec5610 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1501,7 +1501,7 @@ void Control::_set_layout_mode(LayoutMode p_mode) { bool list_changed = false; if (p_mode == LayoutMode::LAYOUT_MODE_POSITION || p_mode == LayoutMode::LAYOUT_MODE_ANCHORS) { - if (has_meta("_edit_layout_mode") && (int)get_meta("_edit_layout_mode") != (int)p_mode) { + if ((int)get_meta("_edit_layout_mode", p_mode) != (int)p_mode) { list_changed = true; } @@ -1646,7 +1646,7 @@ void Control::_set_anchors_layout_preset(int p_preset) { int Control::_get_anchors_layout_preset() const { // If the custom preset was selected by user, use it. - if (has_meta("_edit_use_custom_anchors") && (bool)get_meta("_edit_use_custom_anchors")) { + if ((bool)get_meta("_edit_use_custom_anchors", false)) { return -1; } |