Correct support for Tool Group.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-05-19 17:11:02 +03:00
parent 182d07f761
commit bcec065872
3 changed files with 13 additions and 1 deletions

View File

@ -131,3 +131,14 @@ void VSimpleCurve::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
SetPen(this, currentColor, WidthHairLine(patternUnit));
QGraphicsPathItem::hoverLeaveEvent(event);
}
//---------------------------------------------------------------------------------------------------------------------
QVariant VSimpleCurve::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemSelectedChange)
{
emit Selected(value.toBool(), id);
}
return QGraphicsPathItem::itemChange(change, value);
}

View File

@ -68,6 +68,7 @@ protected:
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(VSimpleCurve)

View File

@ -174,7 +174,7 @@ void VSimplePoint::PointChoosed()
//---------------------------------------------------------------------------------------------------------------------
void VSimplePoint::PointSelected(bool selected)
{
emit Selected(selected, id);
setSelected(selected);
}
//---------------------------------------------------------------------------------------------------------------------