Files
qelectrotech-source-mirror/tests/qttest
Beat Hangartner c52cd3b2fc Keep a line's pivot at its centre when one of its ends is dragged
A shape's pivot follows its centre when it is resized, unless it was
placed by hand: setLine() and setRect() do that, and so did dragging a
rectangle's or an ellipse's handles, which goes through setRect().
Dragging an end of a line moved the end directly and left the pivot
where it was, so the next rotation turned the line around a point
beside it. Undo and redo already re-centred it, through setLine().

The line's handle drag now applies the same rule.

New tst_linepivotresize, on a real folio with scene mouse events: the
pivot is at the new centre after an end is dragged (fails without the
change: it stays at the old centre), and after undo and redo; a pivot
placed by hand stays; a rectangle's pivot follows as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:47:53 +02:00
..
2020-12-08 21:00:43 +01:00
2020-12-08 21:00:43 +01:00