]> git.mxchange.org Git - flightgear.git/commitdiff
Bug 1122, transponder ident.
authorJames Turner <zakalawe@mac.com>
Mon, 27 May 2013 14:59:47 +0000 (15:59 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 27 May 2013 14:59:47 +0000 (15:59 +0100)
Don't fall through to digit-decoding on ident button release.

src/Instrumentation/transponder.cxx

index 2658cf49f7b76d29ddd7277335ba23fa31828f12..a555aba361b8509fc46917e45a715e00fcfebaf3 100644 (file)
@@ -224,10 +224,14 @@ static int modifyCodeDigit(int code, int index, int digitValue)
 void Transponder::valueChanged(SGPropertyNode *prop)
 {
     // Ident button pressed
-    if ((prop == _identBtn_node) && prop->getBoolValue()) {
-        _identTime = 0.0;
-        _ident_node->setBoolValue(true);
-        _identMode = true;
+    if (prop == _identBtn_node) {
+        if (prop->getBoolValue()) {
+            _identTime = 0.0;
+            _ident_node->setBoolValue(true);
+            _identMode = true;
+        } else {
+            // don't cancel state on release
+        }
         return;
     }