diff --git a/ChangeLog.txt b/ChangeLog.txt index 8df32d525..ac2913b12 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -40,6 +40,7 @@ - Fix label size for case with two pins. - Fix crash while synchronize measurements. - Fix incorrect filename regular expressions. +- Enabling Show Curve Details option causes constant redraw. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp index 8260beb7d..d1ce99447 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp @@ -62,8 +62,7 @@ VAbstractSpline::VAbstractSpline(VAbstractPattern *doc, VContainer *data, quint3 sceneType(SceneObject::Unknown), m_isHovered(false), detailsMode(qApp->Settings()->IsShowCurveDetails()), - m_acceptHoverEvents(true), - m_parentRefresh(false) + m_acceptHoverEvents(true) { InitDefShape(); setAcceptHoverEvents(m_acceptHoverEvents); @@ -123,17 +122,7 @@ void VAbstractSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *o PaintWithFixItemHighlightSelected(this, painter, option, widget); }; - if (not m_parentRefresh) - { - RefreshCtrlPoints(); - m_parentRefresh = true; - PaintSpline(painter, option, widget); - } - else - { - m_parentRefresh = false; - PaintSpline(painter, option, widget); - } + PaintSpline(painter, option, widget); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h index 3c3c25811..766c4866c 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h +++ b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.h @@ -151,8 +151,6 @@ protected: private: Q_DISABLE_COPY(VAbstractSpline) - bool m_parentRefresh; - void InitDefShape(); }; diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp index f9498568a..48baa04a8 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp @@ -115,6 +115,8 @@ VToolSpline::VToolSpline(VToolSplineInitData initData, QGraphicsItem *parent) static_cast(spl->GetP3()), freeAngle2, freeLength2, this); InitControlPoint(controlPoint2); + VToolSpline::RefreshCtrlPoints(); + ShowHandles(detailsMode); ToolCreation(initData.typeCreation); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index 8a3a26425..6d714c2d4 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -126,6 +126,8 @@ VToolSplinePath::VToolSplinePath(const VToolSplinePathInitData &initData, QGraph InitControlPoint(controlPoint); } + VToolSplinePath::RefreshCtrlPoints(); + ShowHandles(detailsMode); ToolCreation(initData.typeCreation);