From: david Date: Mon, 23 Dec 2002 19:16:58 +0000 (+0000) Subject: Fixed so that 2D panel bindings work again. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f85b9589daba85133664007c195b6d822809e661;p=flightgear.git Fixed so that 2D panel bindings work again. --- diff --git a/src/Input/input.cxx b/src/Input/input.cxx index f5ccdfa5a..6f86ee0c4 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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 diff --git a/src/Input/input.hxx b/src/Input/input.hxx index 491c0a2ca..7c545d05f 100644 --- a/src/Input/input.hxx +++ b/src/Input/input.hxx @@ -145,7 +145,7 @@ private: string _command_name; SGCommandMgr::command_t _command; - mutable SGPropertyNode_ptr _arg; + mutable SGPropertyNode * _arg; mutable SGPropertyNode_ptr _setting; };