From 84d6e157bb09edf46e53ed3f06627c35e5edf398 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Sat, 2 Apr 2016 11:37:37 +0300 Subject: [PATCH] Fixed InsertTag method --HG-- branch : feature --- src/libs/ifc/xml/vabstractpattern.cpp | 3 ++- src/libs/ifc/xml/vabstractpattern.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 452986f9e..343fb335b 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -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(); 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; } pattern.insertAfter(element, list.at(0)); + break; } SetVersion(); } diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 98d254d57..e22cca707 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -265,7 +265,7 @@ protected: void SetActivPP(const QString& name); void CheckTagExists(const QString &tag); - void InsertTag(const QStringList tags, const QDomElement element); + void InsertTag(const QStringList &tags, const QDomElement &element); private: Q_DISABLE_COPY(VAbstractPattern)