]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed so that 2D panel bindings work again.
authordavid <david>
Mon, 23 Dec 2002 19:16:58 +0000 (19:16 +0000)
committerdavid <david>
Mon, 23 Dec 2002 19:16:58 +0000 (19:16 +0000)
src/Input/input.cxx
src/Input/input.hxx

index f5ccdfa5a5415eae871614f91b8db941fb48e4a4..6f86ee0c4e2e5fe5d1de1ae89dcb2f9008c98119 100644 (file)
@@ -89,13 +89,16 @@ FGBinding::FGBinding ()
 }
 
 FGBinding::FGBinding (const SGPropertyNode * node)
+  : _command(0),
+    _arg(0),
+    _setting(0)
 {
-  FGBinding();
   read(node);
 }
 
 FGBinding::~FGBinding ()
 {
+  delete _arg;                       // Delete the saved arguments
 }
 
 void
@@ -119,7 +122,10 @@ FGBinding::read (const SGPropertyNode * node)
     return;
   }
 
-  _arg = (SGPropertyNode *)node;
+  delete _arg;
+  _arg = new SGPropertyNode;
+  _setting = 0;
+  copyProperties(node, _arg);  // FIXME: don't use whole node!!!
 }
 
 void
index 491c0a2ca4da41b7c68abb19b395f1202de9ee7a..7c545d05ff91fe124f7cfc205aa4a4ff26f3b426 100644 (file)
@@ -145,7 +145,7 @@ private:
 
   string _command_name;
   SGCommandMgr::command_t _command;
-  mutable SGPropertyNode_ptr _arg;
+  mutable SGPropertyNode * _arg;
   mutable SGPropertyNode_ptr _setting;
 };