Fix Valentina crash adding internal path did not increment this object
reference. --HG-- branch : develop
This commit is contained in:
parent
a0ec8ecb64
commit
d1ec8e90dd
|
@ -241,6 +241,7 @@ void VToolPiecePath::AddToFile()
|
||||||
if (path.GetType() == PiecePathType::InternalPath)
|
if (path.GetType() == PiecePathType::InternalPath)
|
||||||
{
|
{
|
||||||
newDet.GetInternalPaths().append(m_id);
|
newDet.GetInternalPaths().append(m_id);
|
||||||
|
incrementReferens(); // Manually increment reference since in this case a piece tool will not do this for us
|
||||||
}
|
}
|
||||||
else if (path.GetType() == PiecePathType::CustomSeamAllowance)
|
else if (path.GetType() == PiecePathType::CustomSeamAllowance)
|
||||||
{
|
{
|
||||||
|
@ -248,6 +249,7 @@ void VToolPiecePath::AddToFile()
|
||||||
record.path = m_id;
|
record.path = m_id;
|
||||||
|
|
||||||
newDet.GetCustomSARecords().append(record);
|
newDet.GetCustomSARecords().append(record);
|
||||||
|
incrementReferens(); // Manually increment reference since in this case a piece tool will not do this for us
|
||||||
}
|
}
|
||||||
|
|
||||||
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
||||||
|
|
|
@ -147,6 +147,7 @@ void VToolPin::AddToFile()
|
||||||
VPiece newDet = oldDet;
|
VPiece newDet = oldDet;
|
||||||
|
|
||||||
newDet.GetPins().append(m_id);
|
newDet.GetPins().append(m_id);
|
||||||
|
incrementReferens(); // Manually increment reference since in this case a piece tool will not do this for us
|
||||||
|
|
||||||
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,7 @@ void VToolPlaceLabel::AddToFile()
|
||||||
VPiece newDet = oldDet;
|
VPiece newDet = oldDet;
|
||||||
|
|
||||||
newDet.GetPlaceLabels().append(m_id);
|
newDet.GetPlaceLabels().append(m_id);
|
||||||
|
incrementReferens(); // Manually increment reference since in this case a piece tool will not do this for us
|
||||||
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
qApp->getUndoStack()->push(new SavePieceOptions(oldDet, newDet, doc, m_pieceId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user