Fix bug with tool seam allowance cursor.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-10-23 14:31:01 +03:00
parent 233efde704
commit 05cad85ab3

View File

@ -1063,7 +1063,7 @@ void VToolSeamAllowance::mousePressEvent(QGraphicsSceneMouseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
void VToolSeamAllowance::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && (flags() & QGraphicsItem::ItemIsMovable))
{
SetItemOverrideCursor(this, cursorArrowOpenHand, 1, 1);
}
@ -1077,6 +1077,16 @@ void VToolSeamAllowance::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
SetItemOverrideCursor(this, cursorArrowOpenHand, 1, 1);
}
else
{
if (QGraphicsScene *scene = this->scene())
{
if (QGraphicsView *view = scene->views().at(0))
{
setCursor(view->viewport()->cursor());
}
}
}
QGraphicsPathItem::hoverEnterEvent(event);
}