From 57245d2b73a953fefdcb07cfbfae51fc4eee42ad Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 14 Apr 2013 10:51:20 -0400 Subject: [PATCH] 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. --- .../gui/team_window/VariablesView.cpp | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index 089ebe4f6f..52ee01bf44 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -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); + } + } } }