Fixed crash with dialog History.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-05-28 13:16:27 +03:00
parent 2e25a12b91
commit 8e3f3a4cd8

View File

@ -335,7 +335,7 @@ QString DialogHistory::Record(const VToolRecord &tool)
case Tool::CutSpline:
{
const quint32 splineId = AttrUInt(domElem, VToolCutSpline::AttrSpline);
const QSharedPointer<VSpline> spl = data->GeometricObject<VSpline>(splineId);
const QSharedPointer<VAbstractCubicBezier> spl = data->GeometricObject<VAbstractCubicBezier>(splineId);
SCASSERT(spl != nullptr);
return QString(tr("%1 - cut %2"))
.arg(PointName(tool.getId()))
@ -344,7 +344,8 @@ QString DialogHistory::Record(const VToolRecord &tool)
case Tool::CutSplinePath:
{
const quint32 splinePathId = AttrUInt(domElem, VToolCutSplinePath::AttrSplinePath);
const QSharedPointer<VSplinePath> splPath = data->GeometricObject<VSplinePath>(splinePathId);
const QSharedPointer<VAbstractCubicBezierPath> splPath =
data->GeometricObject<VAbstractCubicBezierPath>(splinePathId);
SCASSERT(splPath != nullptr);
return QString(tr("%1 - cut %2"))
.arg(PointName(tool.getId()))