mirror of
https://github.com/nasa/openmct.git
synced 2025-04-11 13:20:18 +00:00
[Create] Return cloned object in context
...to allow copyService to be used in the context of a Save As action, with an appropriate navigation change.
This commit is contained in:
parent
c43929f1c6
commit
b37b82133e
@ -101,9 +101,14 @@ define(
|
||||
* Will add a list of clones to the specified parent's composition
|
||||
*/
|
||||
function addClonesToParent(self) {
|
||||
self.parent.getCapability("composition").add(self.firstClone.getId());
|
||||
return self.parent.getCapability("persistence").persist()
|
||||
.then(function(){return self.firstClone;});
|
||||
return self.parent.getCapability("composition")
|
||||
.add(self.firstClone.getId())
|
||||
.then(function (addedClone) {
|
||||
return self.parent.getCapability("persistence").persist()
|
||||
.then(function () {
|
||||
return addedClone;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user