From: ehofman Date: Mon, 9 May 2005 16:18:41 +0000 (+0000) Subject: Melchior: Only change types when explicitly requested. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e19091d8097b11763e5800bc6d3e103da609f941;p=simgear.git Melchior: Only change types when explicitly requested. --- diff --git a/simgear/props/props_io.cxx b/simgear/props/props_io.cxx index 00cafd2a..3d9d1ce3 100644 --- a/simgear/props/props_io.cxx +++ b/simgear/props/props_io.cxx @@ -173,7 +173,6 @@ PropsVisitor::startElement (const char * name, const XMLAttributes &atts) // Got the index, so grab the node. SGPropertyNode * node = st.node->getChild(name, index, true); - node->clearValue(); // Get the access-mode attributes, // but don't set yet (in case they @@ -215,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); } }