From 86d606f87a72754a70174cda7e941e2c25484d9d Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 3 Apr 2006 15:00:33 +0000 Subject: [PATCH] elements that are always update their input field from the , except if they are activated, in which case the user input should, of course, not get overwritten. But if such an input was active and the user selected a different widget, then its contents were dropped. Fix that by setting the "DownCallback" for live input fields. --- src/GUI/dialog.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 412da1312..30c300403 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -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); } -- 2.39.5