X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fprops%2Fprops_io.cxx;h=a4fe5a16e4b62c54f17440dec2b8877a1ddf66ac;hb=68eb7031e2dce999d112d0164fa28d4b8d66922e;hp=0aba26edbf4e0782109322afe34e98b4ae7bbf10;hpb=d88fb32a731de54ddd0bbe279cbb6b1ff3208a42;p=simgear.git diff --git a/simgear/props/props_io.cxx b/simgear/props/props_io.cxx index 0aba26ed..a4fe5a16 100644 --- a/simgear/props/props_io.cxx +++ b/simgear/props/props_io.cxx @@ -214,7 +214,10 @@ PropsVisitor::startElement (const char * name, const XMLAttributes &atts) } } - push_state(node, atts.getValue("type"), mode); + const char *type = atts.getValue("type"); + if (type) + node->clearValue(); + push_state(node, type, mode); } } @@ -588,6 +591,9 @@ copyProperties (const SGPropertyNode *in, SGPropertyNode *out) } } + // copy the attributes. + out->setAttributes( in->getAttributes() ); + // Next, copy the children. int nChildren = in->nChildren(); for (int i = 0; i < nChildren; i++) {