mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 17:44:13 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user