Slight cosmetic adjustment.

If the current node is an address type and has as its only child an array type,
use the same approach we do for pointers to objects and hide the intermediate
dereference.
This commit is contained in:
Rene Gollent
2013-04-14 18:44:53 -04:00
parent 3fe982232b
commit 57245d2b73
@@ -1286,16 +1286,20 @@ VariablesView::VariableTableModel::_AddNode(Variable* variable,
// is a compound type, mark it hidden
if (isOnlyChild && parent != NULL) {
ValueNode* parentValueNode = parent->NodeChild()->Node();
if (parentValueNode != NULL
&& parentValueNode->GetType()->ResolveRawType(false)->Kind()
== TYPE_ADDRESS
&& nodeChildRawType->Kind() == TYPE_COMPOUND) {
node->SetHidden(true);
if (parentValueNode != NULL) {
if (parentValueNode->GetType()->ResolveRawType(false)->Kind()
== TYPE_ADDRESS) {
type_kind childKind = nodeChildRawType->Kind();
if (childKind == TYPE_COMPOUND || childKind == TYPE_ARRAY) {
node->SetHidden(true);
// we need to tell the listener about nodes like this so any
// necessary actions can be taken for them (i.e. value resolution),
// since they're otherwise invisible to outsiders.
NotifyNodeHidden(node);
// we need to tell the listener about nodes like this so
// any necessary actions can be taken for them (i.e. value
// resolution), since they're otherwise invisible to
// outsiders.
NotifyNodeHidden(node);
}
}
}
}