mirror of
https://github.com/nasa/openmct.git
synced 2025-04-19 16:40:58 +00:00
Go to original now shows prompt
This commit is contained in:
parent
3d346b8906
commit
856c61816c
@ -82,10 +82,22 @@ define(
|
||||
// Callback for updating the in-scope reference to the object
|
||||
// that is currently navigated-to.
|
||||
function setNavigation(domainObject) {
|
||||
$scope.navigatedObject = domainObject;
|
||||
$scope.treeModel.selectedObject = domainObject;
|
||||
navigationService.setNavigation(domainObject);
|
||||
updateRoute(domainObject);
|
||||
if (domainObject === $scope.navigatedObject){
|
||||
//do nothing;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isDirty() && !confirm(CONFIRM_MSG)) {
|
||||
navigationService.setNavigation($scope.navigatedObject);
|
||||
} else {
|
||||
if ($scope.navigatedObject && $scope.navigatedObject.hasCapability("editor")){
|
||||
$scope.navigatedObject.getCapability("editor").cancel();
|
||||
}
|
||||
$scope.navigatedObject = domainObject;
|
||||
$scope.treeModel.selectedObject = domainObject;
|
||||
navigationService.setNavigation(domainObject);
|
||||
updateRoute(domainObject);
|
||||
}
|
||||
}
|
||||
|
||||
function setSelectedObject(domainObject) {
|
||||
|
@ -114,6 +114,7 @@ define(
|
||||
EditorCapability.prototype.cancel = function () {
|
||||
this.editableObject.getCapability("status").set("editing", false);
|
||||
//TODO: Reset the cache as well here.
|
||||
this.cache.markClean(this.editableObject);
|
||||
return resolvePromise(undefined);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user