From e19091d8097b11763e5800bc6d3e103da609f941 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 9 May 2005 16:18:41 +0000 Subject: [PATCH] Melchior: Only change types when explicitly requested. --- simgear/props/props_io.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } } -- 2.39.5