]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/dialog.cxx
<input> elements that are <live> always update their input field from the
[flightgear.git] / src / GUI / dialog.cxx
index 412da131233be303a8179d6078cadc21ae3be332..30c3004036330e120371c2cebb8d21d2d289ec54 100644 (file)
@@ -711,6 +711,7 @@ FGDialog::makeObject (SGPropertyNode * props, int parentWidth, int parentHeight)
 void
 FGDialog::setupObject (puObject * object, SGPropertyNode * props)
 {
+    string type = props->getName();
     object->setLabelPlace(PUPLACE_CENTERED_RIGHT);
 
     if (props->hasValue("legend"))
@@ -766,6 +767,10 @@ FGDialog::setupObject (puObject * object, SGPropertyNode * props)
             info->bindings.push_back(new FGBinding(binding));
         }
         object->setCallback(action_callback);
+
+        if (type == "input" && props->getBoolValue("live"))
+            object->setDownCallback(action_callback);
+
         object->setUserData(info);
         _info.push_back(info);
     }