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)
|
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();
|
QString blockName = detail.GetName();
|
||||||
if (m_version <= DRW::AC1009)
|
if (m_version <= DRW::AC1009)
|
||||||
|
@ -749,8 +740,6 @@ auto VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details) -> bool
|
||||||
insert->layer = *layer1;
|
insert->layer = *layer1;
|
||||||
|
|
||||||
m_input->AddEntity(insert.take());
|
m_input->AddEntity(insert.take());
|
||||||
|
|
||||||
deleteBlock = false; // lose ownership
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_input->fileExport(m_binary);
|
return m_input->fileExport(m_binary);
|
||||||
|
@ -940,16 +929,7 @@ auto VDxfEngine::ExportToASTM(const QVector<VLayoutPiece> &details) -> bool
|
||||||
|
|
||||||
for(auto detail : details)
|
for(auto detail : details)
|
||||||
{
|
{
|
||||||
// Use custom deleter function to lose ownership after adding the block
|
auto detailBlock = QSharedPointer<dx_ifaceBlock>::create();
|
||||||
bool deleteBlock = true;
|
|
||||||
auto NoOpDeleter =[&deleteBlock](dx_ifaceBlock* block)
|
|
||||||
{
|
|
||||||
if (deleteBlock)
|
|
||||||
{
|
|
||||||
delete block;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
auto detailBlock = QSharedPointer<dx_ifaceBlock>(new dx_ifaceBlock, NoOpDeleter);
|
|
||||||
|
|
||||||
QString blockName = detail.GetName();
|
QString blockName = detail.GetName();
|
||||||
if (m_version <= DRW::AC1009)
|
if (m_version <= DRW::AC1009)
|
||||||
|
@ -979,8 +959,6 @@ auto VDxfEngine::ExportToASTM(const QVector<VLayoutPiece> &details) -> bool
|
||||||
insert->layer = *layer1;
|
insert->layer = *layer1;
|
||||||
|
|
||||||
m_input->AddEntity(insert.take());
|
m_input->AddEntity(insert.take());
|
||||||
|
|
||||||
deleteBlock = false; // lose ownership
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_input->fileExport(m_binary);
|
return m_input->fileExport(m_binary);
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include "vpiecearea.h"
|
#include "vpiecearea.h"
|
||||||
#include "vpiecearea_p.h"
|
#include "vpiecearea_p.h"
|
||||||
#include "../vpiece.h"
|
#include "../vpatterndb/vpiece.h"
|
||||||
#include "../vcontainer.h"
|
#include "../vpatterndb/vcontainer.h"
|
||||||
#include "vincrement.h"
|
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
@ -49,23 +48,17 @@ VPieceArea::VPieceArea(PieceAreaType type, quint32 pieceId, const VPiece &piece,
|
||||||
|
|
||||||
QString shortName = PieceShortName(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)
|
if (type == PieceAreaType::External)
|
||||||
{
|
{
|
||||||
SetType(VarType::PieceExternalArea);
|
SetType(VarType::PieceExternalArea);
|
||||||
SetName(pieceArea_ + shortName);
|
SetName(pieceArea_ + shortName);
|
||||||
VInternalVariable::SetValue(FromPixel2(piece.ExternalArea(&tempData), unit));
|
VInternalVariable::SetValue(FromPixel2(piece.ExternalArea(data), unit));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetType(VarType::PieceSeamLineArea);
|
SetType(VarType::PieceSeamLineArea);
|
||||||
SetName(pieceSeamLineArea_ + shortName);
|
SetName(pieceSeamLineArea_ + shortName);
|
||||||
VInternalVariable::SetValue(FromPixel2(piece.SeamLineArea(&tempData), unit));
|
VInternalVariable::SetValue(FromPixel2(piece.SeamLineArea(data), unit));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue