From 1bcaf4bfdd38f18ac7c375dd9319935ff3df56ac Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 20 Jun 2005 18:52:45 +0000 Subject: [PATCH] - don't store link to a disconnected *copy* of a subtree, but a link to that subtree in the property tree itself - remove a binding from the property tree --- src/Input/input.cxx | 8 ++++++-- src/Input/input.hxx | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 5bd2d0681..dd49874a6 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -93,6 +93,11 @@ FGBinding::FGBinding (const SGPropertyNode * node) read(node); } +FGBinding::~FGBinding () +{ + _arg->getParent()->removeChild(_arg->getName(), _arg->getIndex()); +} + void FGBinding::read (const SGPropertyNode * node) { @@ -107,9 +112,8 @@ FGBinding::read (const SGPropertyNode * node) return; } - _arg = new SGPropertyNode; + _arg = (SGPropertyNode *)node; _setting = 0; - copyProperties(node, _arg); // FIXME: don't use whole node!!! } void diff --git a/src/Input/input.hxx b/src/Input/input.hxx index 5a41a57a4..72d0b0c97 100644 --- a/src/Input/input.hxx +++ b/src/Input/input.hxx @@ -95,7 +95,7 @@ public: /** * Destructor. */ - virtual ~FGBinding () {} + virtual ~FGBinding (); /** -- 2.39.5