X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fprops%2Fprops.hxx;h=8cf38e6da7954becd375207277a69e56381e837f;hb=708ae35068499af33329f9db91f55441f4956acb;hp=a80fc10ae7c9dc8415bcbd3d02de4673cdeb8b18;hpb=ce67657e0a69faef0ac8ab7660b12beb97cd6799;p=simgear.git diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index a80fc10a..8cf38e6d 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -760,7 +760,10 @@ public: REMOVED = 8, TRACE_READ = 16, TRACE_WRITE = 32, - USERARCHIVE = 64 + USERARCHIVE = 64, + PRESERVE = 128 + // beware: if you add another attribute here, + // also update value of "LAST_USED_ATTRIBUTE". }; @@ -1786,8 +1789,12 @@ bool SGPropertyNode::tie(const SGRawValue &rawValue, bool useDefault) _type = EXTENDED; _tied = true; _value.val = rawValue.clone(); - if (useDefault) + if (useDefault) { + int save_attributes = getAttributes(); + setAttribute( WRITE, true ); setValue(old_val); + setAttributes( save_attributes ); + } return true; }