diff options
-rw-r--r-- | slicer/xml/serializer.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index 369394e..5eab4be 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -379,18 +379,16 @@ namespace Slicer { else if (hp && hp->GetMetadata().flagSet(md_elements)) { ModelTreeIterateDictElements(n->add_child_element(name), mp); } + else if (hp && hp->GetMetadata().flagSet(md_bare)) { + ModelTreeProcessElement(n, mp, [name](auto && PH1, auto &&) { + return PH1->add_child_element(name); + }); + } else { - if (hp && hp->GetMetadata().flagSet(md_bare)) { - ModelTreeProcessElement(n, mp, [name](auto && PH1, auto &&) { - return PH1->add_child_element(name); - }); - } - else { - CurrentElementCreator cec([ec, n, name] { - return ec(n, name); - }); - ModelTreeProcessElement(cec, mp, defaultElementCreator); - } + CurrentElementCreator cec([ec, n, name] { + return ec(n, name); + }); + ModelTreeProcessElement(cec, mp, defaultElementCreator); } } |