Enabling Show Curve Details option causes constant redraw.

This commit is contained in:
Roman Telezhynskyi 2021-02-24 14:54:26 +02:00
parent cecc1dfd4e
commit f46c604bd2
5 changed files with 8 additions and 15 deletions

View File

@ -3,6 +3,7 @@
- Fix regression with country flags.
- Fix bug in seam allowance.
- [smart-pattern/valentina#99] Incorrect fix of seam allowance distortion.
- Enabling Show Curve Details option causes constant redraw.
# Version 0.7.44 Feb 9, 2021
- Placeholder %size% has incorrect value.
@ -165,6 +166,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.

View File

@ -63,8 +63,7 @@ VAbstractSpline::VAbstractSpline(VAbstractPattern *doc, VContainer *data, quint3
sceneType(SceneObject::Unknown),
m_isHovered(false),
detailsMode(VAbstractApplication::VApp()->Settings()->IsShowCurveDetails()),
m_acceptHoverEvents(true),
m_parentRefresh(false)
m_acceptHoverEvents(true)
{
InitDefShape();
setAcceptHoverEvents(m_acceptHoverEvents);
@ -125,17 +124,7 @@ void VAbstractSpline::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
PaintWithFixItemHighlightSelected<QGraphicsPathItem>(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);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -159,8 +159,6 @@ protected:
private:
Q_DISABLE_COPY(VAbstractSpline)
bool m_parentRefresh;
void InitDefShape();
};

View File

@ -115,6 +115,8 @@ VToolSpline::VToolSpline(const VToolSplineInitData &initData, QGraphicsItem *par
static_cast<QPointF>(spl->GetP3()), freeAngle2, freeLength2, this);
InitControlPoint(controlPoint2);
VToolSpline::RefreshCtrlPoints();
ShowHandles(detailsMode);
ToolCreation(initData.typeCreation);

View File

@ -150,6 +150,8 @@ VToolSplinePath::VToolSplinePath(const VToolSplinePathInitData &initData, QGraph
InitControlPoint(controlPoint);
}
VToolSplinePath::RefreshCtrlPoints();
ShowHandles(detailsMode);
ToolCreation(initData.typeCreation);