Fixed InsertTag method

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-04-02 11:37:37 +03:00
parent 56db3f6f1a
commit 84d6e157bb
2 changed files with 3 additions and 2 deletions

View File

@ -1098,7 +1098,7 @@ void VAbstractPattern::CheckTagExists(const QString &tag)
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VAbstractPattern::InsertTag(const QStringList tags, const QDomElement element) void VAbstractPattern::InsertTag(const QStringList &tags, const QDomElement &element)
{ {
QDomElement pattern = documentElement(); QDomElement pattern = documentElement();
for (int i = tags.indexOf(element.tagName())-1; i >= 0; --i) for (int i = tags.indexOf(element.tagName())-1; i >= 0; --i)
@ -1109,6 +1109,7 @@ void VAbstractPattern::InsertTag(const QStringList tags, const QDomElement eleme
continue; continue;
} }
pattern.insertAfter(element, list.at(0)); pattern.insertAfter(element, list.at(0));
break;
} }
SetVersion(); SetVersion();
} }

View File

@ -265,7 +265,7 @@ protected:
void SetActivPP(const QString& name); void SetActivPP(const QString& name);
void CheckTagExists(const QString &tag); void CheckTagExists(const QString &tag);
void InsertTag(const QStringList tags, const QDomElement element); void InsertTag(const QStringList &tags, const QDomElement &element);
private: private:
Q_DISABLE_COPY(VAbstractPattern) Q_DISABLE_COPY(VAbstractPattern)