From aa17d3034e5ccba363a46feedb3252e61534ea61 Mon Sep 17 00:00:00 2001 From: shale Date: Thu, 23 Jul 2015 13:32:15 -0700 Subject: [PATCH] [Search] Fixed excessive calls to setSelection There were excessive calls to TreeNodeController's setSelection() due to a modification for search compatibility. Changed to not call as often. --- .../commonUI/general/src/controllers/TreeNodeController.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/platform/commonUI/general/src/controllers/TreeNodeController.js b/platform/commonUI/general/src/controllers/TreeNodeController.js index 57bf36f753..a804ddabff 100644 --- a/platform/commonUI/general/src/controllers/TreeNodeController.js +++ b/platform/commonUI/general/src/controllers/TreeNodeController.js @@ -171,10 +171,7 @@ define( // If this object is the same as the model's selected object // Same being them having the same ID (this allows different // instances of the same thing to be recognized as the same) - if ($scope.ngModel.selectedObject.getId() === $scope.domainObject.getId()) { - setSelection($scope.domainObject); - } - return isSelected; + return $scope.ngModel.selectedObject.getId() === $scope.domainObject.getId(); // TODO: Check to make sure this change doesn't break anything. }