소스 검색

Merge pull request #109382 from Summersay415/revert-anchors

Revert "Fix incorrect anchor preset when custom offset is set"
Thaddeus Crews 1 개월 전
부모
커밋
9d7250f955
1개의 변경된 파일0개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 4
      scene/gui/control.cpp

+ 0 - 4
scene/gui/control.cpp

@@ -1043,10 +1043,6 @@ int Control::_get_anchors_layout_preset() const {
 	float top = get_anchor(SIDE_TOP);
 	float bottom = get_anchor(SIDE_BOTTOM);
 
-	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) {
-		return -1;
-	}
-
 	if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
 		return (int)LayoutPreset::PRESET_TOP_LEFT;
 	}