]> git.mxchange.org Git - flightgear.git/commitdiff
- don't store link to a disconnected *copy* of a subtree, but a link to
authormfranz <mfranz>
Mon, 20 Jun 2005 18:52:45 +0000 (18:52 +0000)
committermfranz <mfranz>
Mon, 20 Jun 2005 18:52:45 +0000 (18:52 +0000)
  that subtree in the property tree itself
- remove a binding from the property tree

src/Input/input.cxx
src/Input/input.hxx

index 5bd2d0681b5559889f456e740f2b7c9a4b70289e..dd49874a6ac71f03754d7f29e701eb7baaeb4ca6 100644 (file)
@@ -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
index 5a41a57a490f9042be038f9335e21a68629bbe4c..72d0b0c978e11fd98af06b195364e64efc79218a 100644 (file)
@@ -95,7 +95,7 @@ public:
   /**
    * Destructor.
    */
-  virtual ~FGBinding () {}
+  virtual ~FGBinding ();
 
 
   /**