mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
No commits in common. "b1470053f7172e36da2e4382f85a23fb75f42fef" and "69397c14047b3c63d9fadf658dfc0d43459698c2" have entirely different histories.
b1470053f7
...
69397c1404
|
@ -711,17 +711,8 @@ auto VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details) -> bool
|
|||
|
||||
for(auto detail : details)
|
||||
{
|
||||
// Use custom deleter function to lose ownership after adding the block
|
||||
bool deleteBlock = true;
|
||||
auto NoOpDeleter =[&deleteBlock](dx_ifaceBlock* block)
|
||||
{
|
||||
if (deleteBlock)
|
||||
{
|
||||
delete block;
|
||||
}
|
||||
};
|
||||
|
||||
auto detailBlock = QSharedPointer<dx_ifaceBlock>(new dx_ifaceBlock, NoOpDeleter);
|
||||
auto detailBlock = QSharedPointer<dx_ifaceBlock>::create();
|
||||
|
||||
QString blockName = detail.GetName();
|
||||
if (m_version <= DRW::AC1009)
|
||||
|
@ -749,8 +740,6 @@ auto VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details) -> bool
|
|||
insert->layer = *layer1;
|
||||
|
||||
m_input->AddEntity(insert.take());
|
||||
|
||||
deleteBlock = false; // lose ownership
|
||||
}
|
||||
|
||||
return m_input->fileExport(m_binary);
|
||||
|
@ -940,16 +929,7 @@ auto VDxfEngine::ExportToASTM(const QVector<VLayoutPiece> &details) -> bool
|
|||
|
||||
for(auto detail : details)
|
||||
{
|
||||
// Use custom deleter function to lose ownership after adding the block
|
||||
bool deleteBlock = true;
|
||||
auto NoOpDeleter =[&deleteBlock](dx_ifaceBlock* block)
|
||||
{
|
||||
if (deleteBlock)
|
||||
{
|
||||
delete block;
|
||||
}
|
||||
};
|
||||
auto detailBlock = QSharedPointer<dx_ifaceBlock>(new dx_ifaceBlock, NoOpDeleter);
|
||||
auto detailBlock = QSharedPointer<dx_ifaceBlock>::create();
|
||||
|
||||
QString blockName = detail.GetName();
|
||||
if (m_version <= DRW::AC1009)
|
||||
|
@ -979,8 +959,6 @@ auto VDxfEngine::ExportToASTM(const QVector<VLayoutPiece> &details) -> bool
|
|||
insert->layer = *layer1;
|
||||
|
||||
m_input->AddEntity(insert.take());
|
||||
|
||||
deleteBlock = false; // lose ownership
|
||||
}
|
||||
|
||||
return m_input->fileExport(m_binary);
|
||||
|
|
|
@ -27,9 +27,8 @@
|
|||
*************************************************************************/
|
||||
#include "vpiecearea.h"
|
||||
#include "vpiecearea_p.h"
|
||||
#include "../vpiece.h"
|
||||
#include "../vcontainer.h"
|
||||
#include "vincrement.h"
|
||||
#include "../vpatterndb/vpiece.h"
|
||||
#include "../vpatterndb/vcontainer.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
|
@ -49,23 +48,17 @@ VPieceArea::VPieceArea(PieceAreaType type, quint32 pieceId, const VPiece &piece,
|
|||
|
||||
QString shortName = PieceShortName(piece);
|
||||
|
||||
VContainer tempData = *data;
|
||||
auto currentSA = new VIncrement(&tempData, currentSeamAllowance);
|
||||
currentSA->SetFormula(piece.GetSAWidth(), QString().setNum(piece.GetSAWidth()), true);
|
||||
|
||||
tempData.AddVariable(currentSA);
|
||||
|
||||
if (type == PieceAreaType::External)
|
||||
{
|
||||
SetType(VarType::PieceExternalArea);
|
||||
SetName(pieceArea_ + shortName);
|
||||
VInternalVariable::SetValue(FromPixel2(piece.ExternalArea(&tempData), unit));
|
||||
VInternalVariable::SetValue(FromPixel2(piece.ExternalArea(data), unit));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetType(VarType::PieceSeamLineArea);
|
||||
SetName(pieceSeamLineArea_ + shortName);
|
||||
VInternalVariable::SetValue(FromPixel2(piece.SeamLineArea(&tempData), unit));
|
||||
VInternalVariable::SetValue(FromPixel2(piece.SeamLineArea(data), unit));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue