From ec03d4ce018ab2ad9322cb809ff1d818f3c96e1e Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 31 Jan 2009 16:30:38 +0000 Subject: [PATCH] move before part, so that s are applied initially --- src/GUI/dialog.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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