Show direction when hover simple curve.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-07-27 16:25:24 +03:00
parent 139efc6b16
commit d0e2facf94

View File

@ -127,6 +127,10 @@ void VSimpleCurve::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void VSimpleCurve::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void VSimpleCurve::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
m_isHovered = true; m_isHovered = true;
if (not m_curve.isNull())
{
SetDirectionArrows(m_curve->DirectionArrows());
}
QGraphicsPathItem::hoverEnterEvent(event); QGraphicsPathItem::hoverEnterEvent(event);
} }
@ -134,6 +138,7 @@ void VSimpleCurve::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void VSimpleCurve::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VSimpleCurve::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
m_isHovered = false; m_isHovered = false;
SetDirectionArrows(QVector<DirectionArrow>());
QGraphicsPathItem::hoverLeaveEvent(event); QGraphicsPathItem::hoverLeaveEvent(event);
} }