From 6a5e684d904bb52046c9aa792044bfd6717fb10d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 21 Aug 2017 18:07:30 +0300 Subject: [PATCH] Fix conversion a piece label with multiple materials. --HG-- branch : develop --- src/libs/ifc/xml/vpatternconverter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index d4e15a3f9..56320d8e3 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -2268,10 +2268,15 @@ void VPatternConverter::RemoveUnusedTagsV0_6_0() RemoveUniqueTagV0_6_0(strShowDate); RemoveUniqueTagV0_6_0(strShowMeasurements); - const QDomNodeList nodeList = elementsByTagName(strMCP); + QDomNodeList nodeList = elementsByTagName(strData); for (int i = 0; i < nodeList.size(); ++i) { - nodeList.at(i).parentNode().removeChild(nodeList.at(i)); + QDomElement child = nodeList.at(i).firstChildElement(strMCP); + while (not child.isNull()) + { + nodeList.at(i).removeChild(child); + child = nodeList.at(i).firstChildElement(strMCP); + } } }