Make all 4 corners draggable

When scaling, maybe you want to drag from the bottom left or top right

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21554
This commit is contained in:
Seth Hillbrand 2025-08-25 22:01:37 -07:00
parent a034c30563
commit 7841476ed6

View File

@ -1526,8 +1526,12 @@ public:
}
VECTOR2I tl = aPoints.Point( RECT_TOP_LEFT ).GetPosition();
VECTOR2I tr = aPoints.Point( RECT_TOP_RIGHT ).GetPosition();
VECTOR2I bl = aPoints.Point( RECT_BOT_LEFT ).GetPosition();
VECTOR2I br = aPoints.Point( RECT_BOT_RIGHT ).GetPosition();
RECTANGLE_POINT_EDIT_BEHAVIOR::PinEditedCorner( aEditedPoint, aPoints, tl, tr, bl, br );
double sx = static_cast<double>( br.x - tl.x ) / static_cast<double>( oldBox.GetWidth() );
double sy = static_cast<double>( br.y - tl.y ) / static_cast<double>( oldBox.GetHeight() );
double scale = ( sx + sy ) / 2.0;