]> git.mxchange.org Git - simgear.git/commitdiff
Melchior: Only change types when explicitly requested.
authorehofman <ehofman>
Mon, 9 May 2005 16:18:41 +0000 (16:18 +0000)
committerehofman <ehofman>
Mon, 9 May 2005 16:18:41 +0000 (16:18 +0000)
simgear/props/props_io.cxx

index 00cafd2a0b88a15fe7d1d9cd0540177583209d4b..3d9d1ce38a9f9657bbde82bfbb1642155090eac9 100644 (file)
@@ -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);
   }
 }