From b11fd75b4bc0750c848dd0fba782ed6779899a3a Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 27 Apr 2013 13:53:52 -0400 Subject: [PATCH] Fix broken ValueNodeChildrenDeleted() behavior. - Due to the way the item list was being iterated, ValueNodeChildrenDeleted() would only actually remove every other child. --- .../debugger/user_interface/gui/team_window/VariablesView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a055780a22..01ac6f1fd0 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -1035,7 +1035,7 @@ VariablesView::VariableTableModel::ValueNodeChildrenDeleted(ValueNode* node) fNodeTable.Remove(hiddenChild); } - for (int32 i = 0; i < modelNode->CountChildren(); i++) { + for (int32 i = modelNode->CountChildren() - 1; i >= 0 ; i--) { BReference childNode = modelNode->ChildAt(i); TreeTablePath treePath; if (GetTreePath(childNode, treePath)) {