[Search] Tree selection syncs

Selecting something in the search results now
also makes it selected in the filetree. It
remains selected even when the search results
are cleared. (The filetree does not
automatically expand to that position though.)
This commit is contained in:
shale
2015-07-23 12:15:14 -07:00
parent 29d5535e7c
commit 2680e466fa
6 changed files with 26 additions and 55 deletions

View File

@ -165,7 +165,18 @@ define(
* @returns true if this should be highlighted
*/
isSelected: function () {
//return isSelected;
// Modification for compatibility with search.
// 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;
// TODO: Check to make sure this change doesn't break anything.
}
};
}