Fix bug. Piece must increase reference count for each pin.
--HG-- branch : feature
This commit is contained in:
parent
02fde1464d
commit
892e5f298f
|
@ -1075,6 +1075,7 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
|
||||||
InitNodes(detail, scene);
|
InitNodes(detail, scene);
|
||||||
InitCSAPaths(detail);
|
InitCSAPaths(detail);
|
||||||
InitInternalPaths(detail);
|
InitInternalPaths(detail);
|
||||||
|
InitPins(detail);
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
||||||
RefreshGeometry();
|
RefreshGeometry();
|
||||||
|
@ -1203,6 +1204,15 @@ void VToolSeamAllowance::InitInternalPaths(const VPiece &detail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VToolSeamAllowance::InitPins(const VPiece &detail)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < detail.GetPins().size(); ++i)
|
||||||
|
{
|
||||||
|
doc->IncrementReferens(detail.GetPins().at(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolSeamAllowance::DeleteTool(bool ask)
|
void VToolSeamAllowance::DeleteTool(bool ask)
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,6 +155,7 @@ private:
|
||||||
void InitNodes(const VPiece &detail, VMainGraphicsScene *scene);
|
void InitNodes(const VPiece &detail, VMainGraphicsScene *scene);
|
||||||
void InitCSAPaths(const VPiece &detail);
|
void InitCSAPaths(const VPiece &detail);
|
||||||
void InitInternalPaths(const VPiece &detail);
|
void InitInternalPaths(const VPiece &detail);
|
||||||
|
void InitPins(const VPiece &detail);
|
||||||
|
|
||||||
template <typename Tool>
|
template <typename Tool>
|
||||||
Tool* InitTool(VMainGraphicsScene *scene, quint32 toolId);
|
Tool* InitTool(VMainGraphicsScene *scene, quint32 toolId);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user