mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
[Create] Always allow cloning self
Always allow cloning the newly-created object itself when saving a newly-created domain object.
This commit is contained in:
parent
3146660833
commit
0bdf05e61c
@ -106,12 +106,13 @@ define(
|
||||
return fetchObject(object.getModel().location);
|
||||
}
|
||||
|
||||
function isOriginal(domainObject) {
|
||||
return domainObject.getCapability('location').isOriginal();
|
||||
function allowClone(objectToClone) {
|
||||
return (objectToClone.getId() === domainObject.getId()) ||
|
||||
objectToClone.getCapability('location').isOriginal();
|
||||
}
|
||||
|
||||
function cloneIntoParent(parent) {
|
||||
return copyService.perform(domainObject, parent, isOriginal);
|
||||
return copyService.perform(domainObject, parent, allowClone);
|
||||
}
|
||||
|
||||
function cancelEditingAfterClone(clonedObject) {
|
||||
|
Loading…
Reference in New Issue
Block a user