diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index fce6e8ab..12a8fe83 100644 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -1615,8 +1615,12 @@ bool SGPropertyNode::tie (const SGRawValue &rawValue, _tied = true; _value.val = rawValue.clone(); - if (useDefault) + if (useDefault) { + int save_attributes = getAttributes(); + setAttribute( WRITE, true ); setStringValue(old_val.c_str()); + setAttributes( save_attributes ); + } return true; } diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index a80fc10a..e870f440 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -1786,8 +1786,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; }