move <text> before <property> part, so that <format>s are applied initially
This commit is contained in:
parent
11d18d3e5f
commit
ec03d4ce01
1 changed files with 16 additions and 16 deletions
|
@ -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> '"
|
||||
<< 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> '"
|
||||
<< format << '\'');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue