diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 6bfa5c8..2af5199 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -1170,6 +1170,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
.where("_TermId == " + $scope.searchItemId)
.select();
+
+ //if any system is sleleted and the searched term is of another system then show all pins of that system
+ var bodySystemNameOfSeletedPin = pinDataForTerm[0]._BodySystemName;
+
+ if ($scope.selectedSystemName!=null && bodySystemNameOfSeletedPin != $scope.selectedSystemName) {
+
+ $scope.selectedSystemPinData = new jinqJs()
+ .from($scope.aaPinData)
+ .where("_BodySystemName == " + bodySystemNameOfSeletedPin)
+ .select();
+
+ //remove other system pins
+ if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) {
+
+ angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {
+
+ if (aaPinDataValue._BodySystemName != $scope.selectedSystemName)
+ $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);
+ })
+
+ angular.forEach($scope.selectedSystemPinData, function (value, key) {
+
+
+ $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
+
+ })
+ //show annotation on first pin of the sysyem
+ // $scope.showAnnotation($scope.selectedSystemPinData, false, false, false);
+
+ }
+ }
+
+
$scope.showAnnotation(pinDataForTerm, false, false, true);
$scope.IsSearchVisible = false;