Fix regression. After creating a new detail with workpiece tool, only the point

labels appear in the detail screen.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-01-22 19:04:24 +02:00
parent 8a4d915e36
commit 7375a457cd
2 changed files with 18 additions and 3 deletions

View File

@ -107,6 +107,7 @@ VToolSeamAllowance *VToolSeamAllowance::Create(const QPointer<DialogTool> &dialo
if (piece != nullptr) if (piece != nullptr)
{ {
piece->m_dialog = dialog; piece->m_dialog = dialog;
piece->RefreshGeometry(true); // Refresh internal paths
} }
return piece; return piece;
} }
@ -179,7 +180,12 @@ VToolSeamAllowance *VToolSeamAllowance::Duplicate(const QPointer<DialogTool> &di
initData.detail = detail; initData.detail = detail;
initData.width = initData.detail.GetFormulaSAWidth(); initData.width = initData.detail.GetFormulaSAWidth();
return Duplicate(initData); VToolSeamAllowance *piece = Duplicate(initData);
if (piece != nullptr)
{
piece->RefreshGeometry(true); // Refresh internal paths
}
return piece;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -1573,7 +1573,11 @@ void CreateUnitedDetail(const VToolUnionDetailsInitData &initData, qreal dx, qre
pieceInitData.typeCreation = Source::FromTool; pieceInitData.typeCreation = Source::FromTool;
pieceInitData.drawName = drawName; 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) auto DuplicateDetail = [initData](quint32 id)
{ {
@ -1589,7 +1593,12 @@ void CreateUnitedDetail(const VToolUnionDetailsInitData &initData, qreal dx, qre
initPieceData.detail = initData.data->GetPiece(id); initPieceData.detail = initData.data->GetPiece(id);
initPieceData.width = initPieceData.detail.GetFormulaSAWidth(); 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) if (initData.retainPieces)