1
0
Fork 0

Property list: show group id/name in verbose mode

Patch from Henning to simplify debugging canvas trees
This commit is contained in:
James Turner 2019-03-03 11:56:52 +00:00
parent d80537eb2f
commit 87f63c4cec

View file

@ -321,9 +321,25 @@ void PropertyList::updateTextForEntry(NodeData& data)
line << name;
int children = node->nChildren();
if (children)
if (children) {
line << '/';
if (_verbose) {
const SGPropertyNode* id = node->getChild("id");
const SGPropertyNode* name = node->getChild("name");
if (id || name) {
line << " (";
if (id) {
line << "id: " << id->getStringValue();
if (name != NULL)
line << ", ";
} else if (name) {
line << "name: " << name->getStringValue();
}
line << ")";
}
}
}
if (!children || (_verbose && node->hasValue())) {
if (node->getType() == props::STRING
|| node->getType() == props::UNSPECIFIED)