From f5c48b7bf61a27a9fe471488b20e796acbe2a432 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Fri, 24 May 2019 11:55:16 -0700 Subject: [PATCH] Fix regression in adding to display layouts (#2408) * Removed policy preventing duplicate composition, and implemented no-op in composition provider instead * Change order of edit on drop event listener * Add mutation listener to CompositionCollection even if nothing listening to collection * Updated test specs * Address review comments * Fix regression * Removed redundant composition creation --- src/ui/components/ObjectView.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ui/components/ObjectView.vue b/src/ui/components/ObjectView.vue index d4963d759b..ebe07fbb64 100644 --- a/src/ui/components/ObjectView.vue +++ b/src/ui/components/ObjectView.vue @@ -74,6 +74,13 @@ export default { if (!this.currentObject) { return; } + + this.composition = this.openmct.composition.get(this.currentObject); + if (this.composition) { + this.composition._synchronize(); + this.loadComposition(); + } + this.viewContainer = document.createElement('div'); this.viewContainer.classList.add('c-object-view','u-contents'); this.$el.append(this.viewContainer); @@ -125,12 +132,6 @@ export default { this.currentObject = mutatedObject; }); - this.composition = this.openmct.composition.get(this.currentObject); - if (this.composition) { - this.composition._synchronize(); - this.loadComposition(); - } - this.viewKey = viewKey; this.updateView(immediatelySelect); },