From 7375a457cd79ef7c4dca6ecdf5d153a4f2ccbd05 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Jan 2019 19:04:24 +0200 Subject: [PATCH] Fix regression. After creating a new detail with workpiece tool, only the point labels appear in the detail screen. --HG-- branch : develop --- src/libs/vtools/tools/vtoolseamallowance.cpp | 8 +++++++- src/libs/vtools/tools/vtooluniondetails.cpp | 13 +++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index b1a371d11..6c53f0c04 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -107,6 +107,7 @@ VToolSeamAllowance *VToolSeamAllowance::Create(const QPointer &dialo if (piece != nullptr) { piece->m_dialog = dialog; + piece->RefreshGeometry(true); // Refresh internal paths } return piece; } @@ -179,7 +180,12 @@ VToolSeamAllowance *VToolSeamAllowance::Duplicate(const QPointer &di initData.detail = detail; initData.width = initData.detail.GetFormulaSAWidth(); - return Duplicate(initData); + VToolSeamAllowance *piece = Duplicate(initData); + if (piece != nullptr) + { + piece->RefreshGeometry(true); // Refresh internal paths + } + return piece; } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 3ae47fa0f..195c8814f 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -1573,7 +1573,11 @@ void CreateUnitedDetail(const VToolUnionDetailsInitData &initData, qreal dx, qre pieceInitData.typeCreation = Source::FromTool; pieceInitData.drawName = drawName; - VToolSeamAllowance::Create(pieceInitData); + VToolSeamAllowance *piece = VToolSeamAllowance::Create(pieceInitData); + if (piece != nullptr) + { + piece->RefreshGeometry(true); // Refresh internal paths + } auto DuplicateDetail = [initData](quint32 id) { @@ -1589,7 +1593,12 @@ void CreateUnitedDetail(const VToolUnionDetailsInitData &initData, qreal dx, qre initPieceData.detail = initData.data->GetPiece(id); initPieceData.width = initPieceData.detail.GetFormulaSAWidth(); - VToolSeamAllowance::Duplicate(initPieceData); + VToolSeamAllowance *piece = VToolSeamAllowance::Duplicate(initPieceData); + if (piece != nullptr) + { + piece->RefreshGeometry(true); // Refresh internal paths + } + }; if (initData.retainPieces)