Don't clean measurement before begin full parsing.
--HG-- branch : feature
This commit is contained in:
parent
2f34e86322
commit
98a5d8aadb
|
@ -2430,8 +2430,7 @@ void VPattern::PrepareForParse(const Document &parse)
|
||||||
TestUniqueId();
|
TestUniqueId();
|
||||||
sceneDraw->clear();
|
sceneDraw->clear();
|
||||||
sceneDetail->clear();
|
sceneDetail->clear();
|
||||||
data->Clear();
|
data->ClearForFullParse();
|
||||||
UpdateMeasurements();
|
|
||||||
nameActivPP.clear();
|
nameActivPP.clear();
|
||||||
patternPieces.clear();
|
patternPieces.clear();
|
||||||
tools.clear();
|
tools.clear();
|
||||||
|
@ -2452,35 +2451,6 @@ void VPattern::PrepareForParse(const Document &parse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VPattern::UpdateMeasurements()
|
|
||||||
{
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// const QString path = MPath();
|
|
||||||
// if (MType() == MeasurementsType::Standard)
|
|
||||||
// {
|
|
||||||
// VStandardMeasurements m(data);
|
|
||||||
// ValidateXML("://schema/standard_measurements.xsd", path);
|
|
||||||
// m.setXMLContent(path);
|
|
||||||
// m.Measurements();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// VIndividualMeasurements m(data);
|
|
||||||
// ValidateXML("://schema/individual_measurements.xsd", path);
|
|
||||||
// m.setXMLContent(path);
|
|
||||||
// m.Measurements();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch (VException &e)
|
|
||||||
// {
|
|
||||||
// e.CriticalMessageBox(tr("File error."), qApp->getMainWindow());
|
|
||||||
// emit ClearMainWindow();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPattern::ToolsCommonAttributes(const QDomElement &domElement, quint32 &id)
|
void VPattern::ToolsCommonAttributes(const QDomElement &domElement, quint32 &id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,7 +112,6 @@ private:
|
||||||
const Document &parse, const QString& type);
|
const Document &parse, const QString& type);
|
||||||
void ParseIncrementsElement(const QDomNode& node);
|
void ParseIncrementsElement(const QDomNode& node);
|
||||||
void PrepareForParse(const Document &parse);
|
void PrepareForParse(const Document &parse);
|
||||||
void UpdateMeasurements();
|
|
||||||
void ToolsCommonAttributes(const QDomElement &domElement, quint32 &id);
|
void ToolsCommonAttributes(const QDomElement &domElement, quint32 &id);
|
||||||
void PointsCommonAttributes(const QDomElement &domElement, quint32 &id, QString &name, qreal &mx,
|
void PointsCommonAttributes(const QDomElement &domElement, quint32 &id, QString &name, qreal &mx,
|
||||||
qreal &my, QString &typeLine, QString &lineColor);
|
qreal &my, QString &typeLine, QString &lineColor);
|
||||||
|
|
|
@ -235,6 +235,25 @@ void VContainer::Clear()
|
||||||
ClearUniqueNames();
|
ClearUniqueNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VContainer::ClearForFullParse()
|
||||||
|
{
|
||||||
|
qCDebug(vCon, "Clearing container data for full parse.");
|
||||||
|
_id = NULL_ID;
|
||||||
|
|
||||||
|
d->details.clear();
|
||||||
|
ClearVariables(VarType::Increment);
|
||||||
|
ClearVariables(VarType::ArcLength);
|
||||||
|
ClearVariables(VarType::LineAngle);
|
||||||
|
ClearVariables(VarType::LineLength);
|
||||||
|
ClearVariables(VarType::SplineLength);
|
||||||
|
ClearVariables(VarType::ArcRadius);
|
||||||
|
ClearVariables(VarType::ArcAngle);
|
||||||
|
ClearVariables(VarType::SplineAngle);
|
||||||
|
ClearGObjects();
|
||||||
|
ClearUniqueNames();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
|
* @brief ClearObject points, splines, arcs, spline paths will be cleared.
|
||||||
|
|
|
@ -126,6 +126,7 @@ public:
|
||||||
void UpdateDetail(quint32 id, const VDetail &detail);
|
void UpdateDetail(quint32 id, const VDetail &detail);
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
|
void ClearForFullParse();
|
||||||
void ClearGObjects();
|
void ClearGObjects();
|
||||||
void ClearCalculationGObjects();
|
void ClearCalculationGObjects();
|
||||||
void ClearVariables(const VarType &type = VarType::Unknown);
|
void ClearVariables(const VarType &type = VarType::Unknown);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user