From a4df762f175895c6b319621b293d8a33d9101714 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 16 Dec 2012 23:04:52 -0500 Subject: [PATCH] Fix #9294. - Fix incorrect order of operations in ValueNodeManager. - Upon receiving a changed notification, VariableTableModel needs to make tree table aware that the previous nodes have been removed. --- src/apps/debugger/debug_managers/ValueNodeManager.cpp | 5 +++-- .../user_interface/gui/team_window/VariablesView.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apps/debugger/debug_managers/ValueNodeManager.cpp b/src/apps/debugger/debug_managers/ValueNodeManager.cpp index 03399d11102..4dee7114de6 100644 --- a/src/apps/debugger/debug_managers/ValueNodeManager.cpp +++ b/src/apps/debugger/debug_managers/ValueNodeManager.cpp @@ -103,11 +103,12 @@ ValueNodeManager::ValueNodeChanged(ValueNodeChild* nodeChild, AutoLocker containerLocker(fContainer); + for (int32 i = fListeners.CountItems() - 1; i >= 0; i--) + fListeners.ItemAt(i)->ValueNodeChanged(nodeChild, oldNode, newNode); + if (oldNode != NULL) newNode->CreateChildren(); - for (int32 i = fListeners.CountItems() - 1; i >= 0; i--) - fListeners.ItemAt(i)->ValueNodeChanged(nodeChild, oldNode, newNode); } 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 dfde0f06580..17e70f58a12 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -930,8 +930,10 @@ VariablesView::VariableTableModel::ValueNodeChanged(ValueNodeChild* nodeChild, if (modelNode == NULL) return; - if (oldNode != NULL) + if (oldNode != NULL) { + ValueNodeChildrenDeleted(oldNode); NotifyNodeChanged(modelNode); + } }