- 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.
This commit is contained in:
Rene Gollent 2012-12-16 23:04:52 -05:00
parent 287cda6f72
commit a4df762f17
2 changed files with 6 additions and 3 deletions

View File

@ -103,11 +103,12 @@ ValueNodeManager::ValueNodeChanged(ValueNodeChild* nodeChild,
AutoLocker<ValueNodeContainer> 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);
}

View File

@ -930,8 +930,10 @@ VariablesView::VariableTableModel::ValueNodeChanged(ValueNodeChild* nodeChild,
if (modelNode == NULL)
return;
if (oldNode != NULL)
if (oldNode != NULL) {
ValueNodeChildrenDeleted(oldNode);
NotifyNodeChanged(modelNode);
}
}