Simple curve ignore press event and allow move curve by mouse.
--HG-- branch : feature
This commit is contained in:
parent
0deaa1b7b4
commit
99ebbc3ed9
|
@ -204,6 +204,12 @@ void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, cons
|
|||
qApp->getUndoStack()->push(moveSplPath);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolSplinePath::EnableToolMove(bool move)
|
||||
{
|
||||
this->setFlag(QGraphicsItem::ItemIsMovable, move);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief UpdateControlPoints update position points control points in file.
|
||||
|
|
|
@ -73,6 +73,7 @@ public slots:
|
|||
|
||||
void ControlPointChangePosition(const qint32 &indexSpline, const SplinePointPosition &position,
|
||||
const QPointF &pos);
|
||||
virtual void EnableToolMove(bool move);
|
||||
protected:
|
||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event );
|
||||
virtual void RefreshDataInFile();
|
||||
|
|
|
@ -144,6 +144,12 @@ void VSimpleCurve::SetCurrentColor(const QColor &value)
|
|||
setPen(QPen(CorrectColor(currentColor), pen().widthF()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VSimpleCurve::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QColor VSimpleCurve::CorrectColor(const QColor &color) const
|
||||
{
|
||||
|
|
|
@ -60,6 +60,7 @@ signals:
|
|||
void Choosed(quint32 id);
|
||||
void HoverPath(quint32 id, SimpleCurvePoint curvePosition, PathDirection direction);
|
||||
protected:
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent * event);
|
||||
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
|
||||
virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event );
|
||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
|
||||
|
|
Loading…
Reference in New Issue
Block a user