From 324c2cac03ca8f393a1acc7796ced2c5b538a441 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 15 Mar 2016 12:23:46 -0700 Subject: [PATCH] [Tree] Refresh properly on mutation ...by removing the incorrect expectation that a domain object (and not just its model) will be passed in when mutation occurs. Addresses #745. --- platform/commonUI/general/src/ui/TreeView.js | 5 +++-- platform/commonUI/general/test/ui/TreeViewSpec.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/commonUI/general/src/ui/TreeView.js b/platform/commonUI/general/src/ui/TreeView.js index b09256388d..b1b394ae4c 100644 --- a/platform/commonUI/general/src/ui/TreeView.js +++ b/platform/commonUI/general/src/ui/TreeView.js @@ -60,8 +60,9 @@ define([ } }; - TreeView.prototype.loadComposition = function (domainObject) { - var self = this; + TreeView.prototype.loadComposition = function () { + var self = this, + domainObject = this.activeObject; function addNode(domainObject, index) { self.nodeViews[index].model(domainObject); diff --git a/platform/commonUI/general/test/ui/TreeViewSpec.js b/platform/commonUI/general/test/ui/TreeViewSpec.js index 370e5c8e10..adb270f47e 100644 --- a/platform/commonUI/general/test/ui/TreeViewSpec.js +++ b/platform/commonUI/general/test/ui/TreeViewSpec.js @@ -161,7 +161,7 @@ define([ beforeEach(function () { mockComposition.pop(); testCapabilities.mutation.listen - .mostRecentCall.args[0](mockDomainObject); + .mostRecentCall.args[0](mockDomainObject.getModel()); waitForCompositionCallback(); });