diff --git a/src/app/ui/editor/pixels_movement.cpp b/src/app/ui/editor/pixels_movement.cpp index c6c6b82ab..09852b3b6 100644 --- a/src/app/ui/editor/pixels_movement.cpp +++ b/src/app/ui/editor/pixels_movement.cpp @@ -558,8 +558,8 @@ void PixelsMovement::moveImage(const gfx::PointF& pos, MoveModifier moveModifier gfx::PointF pivotPoint = m_currentData.pivot(); // Pivot in [0.0, 1.0] range - gfx::PointF pivot((pivotPoint.x - bounds.x) / bounds.w, - (pivotPoint.y - bounds.y) / bounds.h); + gfx::PointF pivot((pivotPoint.x - bounds.x) / ABS(bounds.w), + (pivotPoint.y - bounds.y) / ABS(bounds.h)); // Vector from AB (or CD), and AC (or BD) vec2 u = to_vec2(B - A);