]> git.mxchange.org Git - flightgear.git/commitdiff
show attributes if /sim/gui/dialogs/property-browser/show-flags == true:
authormfranz <mfranz>
Thu, 18 May 2006 14:46:42 +0000 (14:46 +0000)
committermfranz <mfranz>
Thu, 18 May 2006 14:46:42 +0000 (14:46 +0000)
r ... read protected
w ... write protected (untested; does probably not work for obvious reasons ;-)
A ... archive
U ... userarchive
T ... tied

src/GUI/prop_picker.cxx

index e8f06ce88d6a6b9433937f66e69efe4854e2ed2c..01f0415f03251e70a15d8d56a25f3e90f76805c3 100755 (executable)
@@ -532,8 +532,25 @@ void fgPropPicker::updateTextForEntry(int index)
     stdString line = node->getDisplayName() + stdString(" = '")
         + value + "' " + "(";
     line += getValueTypeString( node );
+
+    if (fgGetBool("/sim/gui/dialogs/property-browser/show-flags", false)) {
+        stdString ext;
+        if (!node->getAttribute(SGPropertyNode::READ))
+            ext += "r";
+        if (!node->getAttribute(SGPropertyNode::WRITE))
+            ext += "w";
+        if (node->getAttribute(SGPropertyNode::ARCHIVE))
+            ext += "A";
+        if (node->getAttribute(SGPropertyNode::USERARCHIVE))
+            ext += "U";
+        if (node->isTied())
+            ext += "T";
+        if (ext.size())
+            line += ", " + ext;
+    }
+
     line += ")";
-       
+
     // truncate entries to plib pui limit
     if (line.length() >= PUSTRING_MAX)
         line[PUSTRING_MAX-1] = '\0';