diff --git a/UI/window-basic-preview.cpp b/UI/window-basic-preview.cpp index 7fb8bd556..40d6bc85b 100644 --- a/UI/window-basic-preview.cpp +++ b/UI/window-basic-preview.cpp @@ -2506,6 +2506,23 @@ void OBSBasicPreview::DrawSpacingHelpers() groupOti.pos.x, groupOti.pos.y, 0.0f); } + // Switch top/bottom or right/left if scale is negative + if (oti.scale.x < 0.0f) { + vec3 l = left; + vec3 r = right; + + vec3_copy(&left, &r); + vec3_copy(&right, &l); + } + + if (oti.scale.y < 0.0f) { + vec3 t = top; + vec3 b = bottom; + + vec3_copy(&top, &b); + vec3_copy(&bottom, &t); + } + if (rot >= HELPER_ROT_BREAKPONT) { for (float i = HELPER_ROT_BREAKPONT; i <= 360.0f; i += 90.0f) { if (rot < i) @@ -2539,23 +2556,6 @@ void OBSBasicPreview::DrawSpacingHelpers() } } - // Switch top/bottom or right/left if scale is negative - if (oti.scale.x < 0.0f) { - vec3 l = left; - vec3 r = right; - - vec3_copy(&left, &r); - vec3_copy(&right, &l); - } - - if (oti.scale.y < 0.0f) { - vec3 t = top; - vec3 b = bottom; - - vec3_copy(&top, &b); - vec3_copy(&bottom, &t); - } - // Get sides of box transform left = GetTransformedPos(left.x, left.y, boxTransform); right = GetTransformedPos(right.x, right.y, boxTransform);