[Containment] Set validity in locator

Set validity of selected location from locator control, to
disallow creation when no valid location is selected (which
is possible due to containment rules.) WTD-962.
This commit is contained in:
Victor Woeltjen
2015-04-07 22:30:21 -07:00
parent 0550e09344
commit cc0a46d5cc
2 changed files with 19 additions and 6 deletions

View File

@@ -34,8 +34,17 @@ define(
$scope.structure.validate(priorObject) ?
priorObject : undefined
);
return;
}
}
// Set validity
if ($scope.ngModelController) {
$scope.ngModelController.$setValidity(
'composition',
!!$scope.treeModel.selectedObject
);
}
}
// Initial state for the tree's model