hrev45697 adds 1 changeset to branch 'master' old head: c05a041eac2efd14e3e77ac1cc0f3e89fe89f4c5 new head: d51ab41d49c22818ab2701f7aa52c6257369f4ab overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d51ab41+%5Ec05a041 ---------------------------------------------------------------------------- d51ab41: Fix oversight in set visible range support. Detect the case where we have a pointer to an array type, as seen when typecasting a pointer to an array, and present the set visible range option for these as well. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45697 Commit: d51ab41d49c22818ab2701f7aa52c6257369f4ab URL: http://cgit.haiku-os.org/haiku/commit/?id=d51ab41 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sat May 18 02:06:04 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 20 insertions(+), 5 deletions(-) .../gui/team_window/VariablesView.cpp | 25 ++++++++++++++++---- ---------------------------------------------------------------------------- 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 9826f74..2b4b040 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -1593,6 +1593,9 @@ VariablesView::MessageReceived(BMessage* message) ->SelectionModel()->NodeAt(0); int32 lowerBound, upperBound; ValueNode* valueNode = node->NodeChild()->Node(); + if (!valueNode->IsRangedContainer()) + valueNode = node->ChildAt(0)->NodeChild()->Node(); + if (valueNode->SupportedChildRange(lowerBound, upperBound) != B_OK) break; @@ -1623,6 +1626,8 @@ VariablesView::MessageReceived(BMessage* message) ->SelectionModel()->NodeAt(0); int32 lowerBound, upperBound; ValueNode* valueNode = node->NodeChild()->Node(); + if (!valueNode->IsRangedContainer()) + valueNode = node->ChildAt(0)->NodeChild()->Node(); if (valueNode->SupportedChildRange(lowerBound, upperBound) != B_OK) break; @@ -1992,13 +1997,23 @@ VariablesView::_GetContextActionsForNode(ModelNode* node, return result; ValueNode* valueNode = node->NodeChild()->Node(); - if (valueNode != NULL && valueNode->IsRangedContainer()) { - result = _AddContextAction("Set visible range" B_UTF8_ELLIPSIS, - MSG_SHOW_CONTAINER_RANGE_PROMPT, actions, message); - if (result != B_OK) - return result; + if (valueNode == NULL) + return B_OK; + + if (!valueNode->IsRangedContainer()) { + if (node->CountChildren() == 1 && node->ChildAt(0)->IsHidden()) { + valueNode = node->ChildAt(0)->NodeChild()->Node(); + if (valueNode == NULL || !valueNode->IsRangedContainer()) + return B_OK; + } else + return B_OK; } + result = _AddContextAction("Set visible range" B_UTF8_ELLIPSIS, + MSG_SHOW_CONTAINER_RANGE_PROMPT, actions, message); + if (result != B_OK) + return result; + return B_OK; }