diff --git a/src/app/tools/drawTools/vtoolsinglepoint.cpp b/src/app/tools/drawTools/vtoolsinglepoint.cpp index 7eb211a7a..f2885fde1 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/app/tools/drawTools/vtoolsinglepoint.cpp @@ -68,6 +68,13 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, } } +//--------------------------------------------------------------------------------------------------------------------- +VToolSinglePoint::~VToolSinglePoint() +{ + //Disable cursor-arrow-openhand + VApplication::restoreOverrideCursor(cursorArrowOpenHand); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief setDialog set dialog when user want change tool option. diff --git a/src/app/tools/drawTools/vtoolsinglepoint.h b/src/app/tools/drawTools/vtoolsinglepoint.h index 3e10d950d..ffc611a00 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.h +++ b/src/app/tools/drawTools/vtoolsinglepoint.h @@ -41,6 +41,7 @@ class VToolSinglePoint : public VToolPoint public: VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, const QString &namePP, const QString &mPath, QGraphicsItem * parent = nullptr ); + virtual ~VToolSinglePoint(); virtual void setDialog(); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/app/tools/drawTools/vtoolspline.cpp index 4246da5b1..7579a2935 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/app/tools/drawTools/vtoolspline.cpp @@ -97,7 +97,10 @@ VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const QStr //--------------------------------------------------------------------------------------------------------------------- VToolSpline::~VToolSpline() -{} +{ + //Disable cursor-arrow-openhand + VApplication::restoreOverrideCursor(cursorArrowOpenHand); +} //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index 6a3b0f158..414becdaa 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -97,6 +97,13 @@ VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, co } } +//--------------------------------------------------------------------------------------------------------------------- +VToolSplinePath::~VToolSplinePath() +{ + //Disable cursor-arrow-openhand + VApplication::restoreOverrideCursor(cursorArrowOpenHand); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief setDialog set dialog when user want change tool option. diff --git a/src/app/tools/drawTools/vtoolsplinepath.h b/src/app/tools/drawTools/vtoolsplinepath.h index 0e057644c..268803eb8 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.h +++ b/src/app/tools/drawTools/vtoolsplinepath.h @@ -40,20 +40,21 @@ class VToolSplinePath:public VAbstractSpline public: VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr); - virtual void setDialog(); - static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); - static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, - const Source &typeCreation); - static const QString ToolType; - static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path); - virtual int type() const {return Type;} - enum { Type = UserType + static_cast(Tool::SplinePath)}; + virtual ~VToolSplinePath(); + virtual void setDialog(); + static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color, + VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation); + static const QString ToolType; + static void UpdatePathPoint(VPattern *doc, QDomNode& node, const VSplinePath &path); + virtual int type() const {return Type;} + enum { Type = UserType + static_cast(Tool::SplinePath)}; - VSplinePath getSplinePath()const; - void setSplinePath(const VSplinePath &splPath); + VSplinePath getSplinePath()const; + void setSplinePath(const VSplinePath &splPath); - virtual void ShowVisualization(bool show); + virtual void ShowVisualization(bool show); signals: /** * @brief RefreshLine refresh control line. diff --git a/src/app/visualization/vcontrolpointspline.cpp b/src/app/visualization/vcontrolpointspline.cpp index 1842124f6..11cc17cd0 100644 --- a/src/app/visualization/vcontrolpointspline.cpp +++ b/src/app/visualization/vcontrolpointspline.cpp @@ -69,6 +69,13 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePointP controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); } +//--------------------------------------------------------------------------------------------------------------------- +VControlPointSpline::~VControlPointSpline() +{ + //Disable cursor-arrow-openhand + VApplication::restoreOverrideCursor(cursorArrowOpenHand); +} + //--------------------------------------------------------------------------------------------------------------------- void VControlPointSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { diff --git a/src/app/visualization/vcontrolpointspline.h b/src/app/visualization/vcontrolpointspline.h index cb9b16b05..759965e65 100644 --- a/src/app/visualization/vcontrolpointspline.h +++ b/src/app/visualization/vcontrolpointspline.h @@ -42,6 +42,7 @@ class VControlPointSpline : public QObject, public QGraphicsEllipseItem public: VControlPointSpline(const qint32 &indexSpline, SplinePointPosition position, const QPointF &controlPoint, const QPointF &splinePoint, QGraphicsItem * parent = nullptr); + virtual ~VControlPointSpline(); virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Vis::ControlPointSpline)}; diff --git a/src/app/visualization/vgraphicssimpletextitem.cpp b/src/app/visualization/vgraphicssimpletextitem.cpp index dc8d4d25e..a34a0610a 100644 --- a/src/app/visualization/vgraphicssimpletextitem.cpp +++ b/src/app/visualization/vgraphicssimpletextitem.cpp @@ -70,6 +70,13 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphic this->setAcceptHoverEvents(true); } +//--------------------------------------------------------------------------------------------------------------------- +VGraphicsSimpleTextItem::~VGraphicsSimpleTextItem() +{ + //Disable cursor-arrow-openhand + VApplication::restoreOverrideCursor(cursorArrowOpenHand); +} + //--------------------------------------------------------------------------------------------------------------------- void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { diff --git a/src/app/visualization/vgraphicssimpletextitem.h b/src/app/visualization/vgraphicssimpletextitem.h index 76fd29a07..607413d08 100644 --- a/src/app/visualization/vgraphicssimpletextitem.h +++ b/src/app/visualization/vgraphicssimpletextitem.h @@ -42,6 +42,7 @@ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem public: VGraphicsSimpleTextItem(QGraphicsItem *parent = nullptr); VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr ); + virtual ~VGraphicsSimpleTextItem(); qint32 FontSize()const; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);