Fix crash when create an internal path.
--HG-- branch : feature
This commit is contained in:
parent
548f7844f4
commit
c065824306
|
@ -229,12 +229,15 @@ void DialogPiecePath::ShowVisualization()
|
||||||
{
|
{
|
||||||
AddVisualization<VisToolPiecePath>();
|
AddVisualization<VisToolPiecePath>();
|
||||||
|
|
||||||
|
if (m_showMode)
|
||||||
|
{
|
||||||
VToolSeamAllowance *tool = qobject_cast<VToolSeamAllowance*>(VAbstractPattern::getTool(GetPieceId()));
|
VToolSeamAllowance *tool = qobject_cast<VToolSeamAllowance*>(VAbstractPattern::getTool(GetPieceId()));
|
||||||
SCASSERT(tool != nullptr);
|
SCASSERT(tool != nullptr);
|
||||||
auto visPath = qobject_cast<VisToolPiecePath *>(vis);
|
auto visPath = qobject_cast<VisToolPiecePath *>(vis);
|
||||||
SCASSERT(visPath != nullptr);
|
SCASSERT(visPath != nullptr);
|
||||||
visPath->setParentItem(tool);
|
visPath->setParentItem(tool);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPiecePath::ShowContextMenu(const QPoint &pos)
|
void DialogPiecePath::ShowContextMenu(const QPoint &pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user