1
0
Fork 0

make sure that the validation nodes are readable and writable

This commit is contained in:
mfranz 2008-07-17 08:38:13 +00:00
parent f79dbc23bf
commit ba27bab1b2

View file

@ -203,7 +203,12 @@ const char *fgValidatePath (const char *str, bool write)
static SGPropertyNode_ptr r, w; static SGPropertyNode_ptr r, w;
if (!r) { if (!r) {
r = fgGetNode("/sim/paths/validate/read", true); r = fgGetNode("/sim/paths/validate/read", true);
r->setAttribute(SGPropertyNode::READ, true);
r->setAttribute(SGPropertyNode::WRITE, true);
w = fgGetNode("/sim/paths/validate/write", true); w = fgGetNode("/sim/paths/validate/write", true);
w->setAttribute(SGPropertyNode::READ, true);
w->setAttribute(SGPropertyNode::WRITE, true);
} }
SGPropertyNode *prop = write ? w : r; SGPropertyNode *prop = write ? w : r;
prop->setStringValue(str); prop->setStringValue(str);