GarbageCollector make file broken.
--HG-- branch : develop
This commit is contained in:
parent
c631854f3c
commit
e4d054e2dc
|
@ -711,7 +711,6 @@ bool VPattern::SaveDocument(const QString &fileName, QString &error)
|
|||
e.CriticalMessageBox(tr("Error no unique id."), qApp->getMainWindow());
|
||||
return false;
|
||||
}
|
||||
GarbageCollector();
|
||||
|
||||
return VDomDocument::SaveDocument(fileName, error);
|
||||
}
|
||||
|
@ -2581,29 +2580,6 @@ void VPattern::UpdateMeasurements()
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::GarbageCollector()
|
||||
{
|
||||
QHashIterator<quint32, VDataTool*> t(tools);
|
||||
while (t.hasNext())
|
||||
{
|
||||
t.next();
|
||||
VDataTool *tool = t.value();
|
||||
if (tool->referens() <= 1)
|
||||
{
|
||||
QDomElement domElement = elementById(QString().setNum(t.key()));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
QDomNode parent = domElement.parentNode();
|
||||
if (parent.isNull() == false && parent.toElement().tagName() == TagModeling)
|
||||
{
|
||||
parent.removeChild(domElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::ToolsCommonAttributes(const QDomElement &domElement, quint32 &id)
|
||||
{
|
||||
|
|
|
@ -271,7 +271,6 @@ private:
|
|||
void CollectId(const QDomElement &node, QVector<quint32> &vector)const;
|
||||
void PrepareForParse(const Document &parse);
|
||||
void UpdateMeasurements();
|
||||
void GarbageCollector();
|
||||
void ToolsCommonAttributes(const QDomElement &domElement, quint32 &id);
|
||||
void PointsCommonAttributes(const QDomElement &domElement, quint32 &id, QString &name, qreal &mx,
|
||||
qreal &my, QString &typeLine);
|
||||
|
|
Loading…
Reference in New Issue
Block a user