Skip to content

Commit bf5fada

Browse files
committed
Revert "Fix incorrect anchor preset when custom offset is set"
1 parent 65eb664 commit bf5fada

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

scene/gui/control.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,10 +1043,6 @@ int Control::_get_anchors_layout_preset() const {
10431043
float top = get_anchor(SIDE_TOP);
10441044
float bottom = get_anchor(SIDE_BOTTOM);
10451045

1046-
if (get_offset(SIDE_LEFT) != 0.0 || get_offset(SIDE_RIGHT) != 0.0 || get_offset(SIDE_TOP) != 0.0 || get_offset(SIDE_BOTTOM) != 0.0) {
1047-
return -1;
1048-
}
1049-
10501046
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
10511047
return (int)LayoutPreset::PRESET_TOP_LEFT;
10521048
}

0 commit comments

Comments
 (0)