Fixes for spline control point.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-10-29 13:48:28 +02:00
parent f16d26b659
commit 1cd126856c

View File

@ -225,6 +225,12 @@ void VControlPointSpline::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
SetItemOverrideCursor(this, cursorArrowCloseHand, 1, 1);
}
// Somehow clicking on notselectable object do not clean previous selections.
if (not (flags() & ItemIsSelectable) && scene())
{
scene()->clearSelection();
}
}
VScenePoint::mousePressEvent(event);
}
@ -301,8 +307,4 @@ void VControlPointSpline::setEnabledPoint(bool enable)
{
setEnabled(enable);
controlLine->setEnabled(enable);
setFlag(QGraphicsItem::ItemIsSelectable, enable);
setFlag(QGraphicsItem::ItemIsMovable, enable);
setAcceptHoverEvents(enable);
}