Fixed issue #622. Piece lost custom seam allowance data.
--HG-- branch : develop
This commit is contained in:
parent
a740d52861
commit
a1774149f6
|
@ -40,6 +40,7 @@
|
||||||
#include "../vpatterndb/vpatternpiecedata.h"
|
#include "../vpatterndb/vpatternpiecedata.h"
|
||||||
#include "../vpatterndb/vpatterninfogeometry.h"
|
#include "../vpatterndb/vpatterninfogeometry.h"
|
||||||
#include "../vpatterndb/vgrainlinegeometry.h"
|
#include "../vpatterndb/vgrainlinegeometry.h"
|
||||||
|
#include "../vtools/tools/vabstracttool.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -475,7 +476,9 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash<quint32, VPiece> *det
|
||||||
QHash<quint32, VPiece>::const_iterator i = details->constBegin();
|
QHash<quint32, VPiece>::const_iterator i = details->constBegin();
|
||||||
while (i != details->constEnd())
|
while (i != details->constEnd())
|
||||||
{
|
{
|
||||||
listDetails.append(VLayoutPiece::Create(i.value(), pattern));
|
VAbstractTool *tool = qobject_cast<VAbstractTool*>(doc->getTool(i.key()));
|
||||||
|
SCASSERT(tool != nullptr)
|
||||||
|
listDetails.append(VLayoutPiece::Create(i.value(), tool->getData()));
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ VToolSeamAllowance *VToolSeamAllowance::Create(quint32 id, VPiece newPiece, QStr
|
||||||
doc->AddTool(id, piece);
|
doc->AddTool(id, piece);
|
||||||
}
|
}
|
||||||
//Very important to delete it. Only this tool need this special variable.
|
//Very important to delete it. Only this tool need this special variable.
|
||||||
data->RemoveVariable(currentLength);
|
data->RemoveVariable(currentSeamAllowance);
|
||||||
return piece;
|
return piece;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user