summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/xml/serializer.cpp8
1 files 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