]> git.mxchange.org Git - flightgear.git/commitdiff
move <text> before <property> part, so that <format>s are applied initially
authormfranz <mfranz>
Sat, 31 Jan 2009 16:30:38 +0000 (16:30 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 1 Feb 2009 23:58:01 +0000 (00:58 +0100)
src/GUI/dialog.cxx

index 6d710e7e6e2b717defcd3c6480795bdf22547456..50703847ac00ca279e5f045f235b45e1577d9ffa 100644 (file)
@@ -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