From db6de640ce0ff3352754f39ead1e244c1e5b5e53 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 18 Aug 2017 14:56:31 +0300 Subject: [PATCH] Fix crash. --HG-- branch : feature --- src/libs/vtools/dialogs/support/dialogeditlabel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp index 3149b9f1f..b6ae04ceb 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.cpp @@ -584,10 +584,11 @@ void DialogEditLabel::SetTemplate(const QVector &lines) //--------------------------------------------------------------------------------------------------------------------- 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_pQuantity].second = QString::number(piece.GetPatternPieceData().GetQuantity()); - if (piece.GetPatternPieceData().IsOnFold()) + m_placeholders[pl_pQuantity].second = QString::number(pieceData.GetQuantity()); + if (pieceData.IsOnFold()) { m_placeholders[pl_wOnFold].second = tr("on fold"); }