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)