Make sure both composites are known to this composite bar in move

This commit is contained in:
isidor 2017-10-23 15:01:27 +02:00
parent 97b51c5338
commit 6779069b83

View file

@ -403,6 +403,10 @@ export class CompositeBar implements ICompositeBar {
}
public move(compositeId: string, toCompositeId: string): void {
// Make sure both composites are known to this composite bar
if (this.options.composites.filter(c => c.id === compositeId || c.id === toCompositeId).length !== 2) {
return;
}
// Make sure a moved composite gets pinned
if (!this.isPinned(compositeId)) {
this.pin(compositeId, false /* defer update, we take care of it */);