Fix crash.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-08-18 14:56:31 +03:00
parent 5961f52a73
commit db6de640ce

View File

@ -584,10 +584,11 @@ void DialogEditLabel::SetTemplate(const QVector<VLabelTemplateLine> &lines)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogEditLabel::SetPiece(const VPiece &piece) void DialogEditLabel::SetPiece(const VPiece &piece)
{ {
m_placeholders[pl_pLetter].second = piece.GetPatternPieceData().GetLetter(); const VPieceLabelData& pieceData = piece.GetPatternPieceData();
m_placeholders[pl_pLetter].second = pieceData.GetLetter();
m_placeholders[pl_pName].second = piece.GetName(); m_placeholders[pl_pName].second = piece.GetName();
m_placeholders[pl_pQuantity].second = QString::number(piece.GetPatternPieceData().GetQuantity()); m_placeholders[pl_pQuantity].second = QString::number(pieceData.GetQuantity());
if (piece.GetPatternPieceData().IsOnFold()) if (pieceData.IsOnFold())
{ {
m_placeholders[pl_wOnFold].second = tr("on fold"); m_placeholders[pl_wOnFold].second = tr("on fold");
} }