hrev45570 adds 1 changeset to branch 'master' old head: 7198436cc28efa74e16de67ec8cc1068a9856068 new head: 6a2d6f5062d43a3f5f631c699d3f0a90b0eff8bd overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=6a2d6f5+%5E7198436 ---------------------------------------------------------------------------- 6a2d6f5: Fix a case where values wouldn't be requested properly. - If a node was already expanded, and we then removed/replaced its children, those wouldn't automatically get their value nodes added. Consequently, value retrieval for them would fail until the parent was collapsed/re-expanded. If we encounter such a model node when receiving a value request, notify the table model so it can construct the value node appropriately. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45570 Commit: 6a2d6f5062d43a3f5f631c699d3f0a90b0eff8bd URL: http://cgit.haiku-os.org/haiku/commit/?id=6a2d6f5 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sat Apr 27 20:04:33 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 20 insertions(+), 8 deletions(-) .../gui/team_window/VariablesView.cpp | 28 ++++++++++++++------ ---------------------------------------------------------------------------- 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 df5ec67..d866847 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -998,11 +998,9 @@ VariablesView::VariableTableModel::ValueNodeChildrenCreated( child->IsInternal(), childCount == 1); } - if (valueNode->ChildCreationNeedsValue()) { - ModelNode* childNode = fNodeTable.Lookup(child); - if (childNode != NULL) - fContainerListener->ModelNodeValueRequested(childNode); - } + ModelNode* childNode = fNodeTable.Lookup(child); + if (childNode != NULL) + fContainerListener->ModelNodeValueRequested(childNode); } if (valueNode->ChildCreationNeedsValue()) @@ -1921,9 +1919,23 @@ VariablesView::_RequestNodeValue(ModelNode* node) // get the value node and check whether its value has not yet been resolved ValueNode* valueNode = nodeChild->Node(); - if (valueNode == NULL - || valueNode->LocationAndValueResolutionState() - != VALUE_NODE_UNRESOLVED) { + if (valueNode == NULL) { + ModelNode* parent = node->Parent(); + if (parent != NULL) { + TreeTablePath path; + if (!fVariableTableModel->GetTreePath(parent, path)) + return; + + // if the parent node was already expanded when the child was + // added, we may not yet have added a value node. + // Notify the table model that this needs to be done. + if (fVariableTable->IsNodeExpanded(path)) + fVariableTableModel->NodeExpanded(parent); + } + } + + if (valueNode == NULL || valueNode->LocationAndValueResolutionState() + != VALUE_NODE_UNRESOLVED) { return; }