diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 6d710e7e6..50703847a 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -845,6 +845,22 @@ FGDialog::setupObject (puObject *object, SGPropertyNode *props) object->setLabelFont(*_font); } + string type = props->getName(); + if (type == "input" && props->getBoolValue("live")) + object->setDownCallback(action_callback); + + if (type == "text") { + const char *format = props->getStringValue("format", 0); + if (format) { + info->fmt_type = validate_format(format); + if (info->fmt_type != f_INVALID) + info->format = format; + else + SG_LOG(SG_GENERAL, SG_ALERT, "DIALOG: invalid '" + << format << '\''); + } + } + if (props->hasValue("property")) { const char *name = props->getStringValue("name"); if (name == 0) @@ -882,22 +898,6 @@ FGDialog::setupObject (puObject *object, SGPropertyNode *props) } object->setCallback(action_callback); } - - string type = props->getName(); - if (type == "input" && props->getBoolValue("live")) - object->setDownCallback(action_callback); - - if (type == "text") { - const char *format = props->getStringValue("format", 0); - if (format) { - info->fmt_type = validate_format(format); - if (info->fmt_type != f_INVALID) - info->format = format; - else - SG_LOG(SG_GENERAL, SG_ALERT, "DIALOG: invalid '" - << format << '\''); - } - } } void