Merge pull request #1435 from bhangart/fix/line-pivot-follows-resize

Keep a line's pivot at its centre when one of its ends is dragged
This commit is contained in:
ispyisail
2026-10-13 16:29:20 +13:00
committed by GitHub
6 changed files with 481 additions and 17 deletions
+4
View File
@@ -2465,6 +2465,10 @@ void QetShapeItem::dragResize(int index, const QPointF &localPos, Qt::KeyboardMo
{
prepareGeometryChange();
(index == 0 ? m_P1 : m_P2) = localPos;
// The same rule as setLine() and setRect(): a pivot nobody placed
// by hand follows the centre.
if (!m_pivotIsCustom)
resetPivotToBoundingRectCenter();
repositionHandles();
emit geometryChanged();
return;