From c16d0afab555bf1fc8db82be391bdd61dfffc919 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 25 Sep 2016 00:08:38 +0100 Subject: Only write simple models as text --- slicer/xml/serializer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index c1e4023..9df87b8 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -265,8 +265,12 @@ namespace Slicer { element->set_attribute(*typeIdPropName, *typeId); mp = mp->GetSubclassModelPart(*typeId); } - mp->GetValue(new XmlContentValueTarget(element)); - mp->OnEachChild(boost::bind(&XmlSerializer::ModelTreeIterate, element, _1, _2, _3, ec)); + if (mp->GetType() == mpt_Simple) { + mp->GetValue(new XmlContentValueTarget(element)); + } + else { + mp->OnEachChild(boost::bind(&XmlSerializer::ModelTreeIterate, element, _1, _2, _3, ec)); + } } void -- cgit v1.2.3