From 698508fde47504e6d13bc4ecc6ad7e385ba391bc Mon Sep 17 00:00:00 2001 From: Joshi Date: Mon, 6 Apr 2020 14:02:06 -0700 Subject: [PATCH] Use the subobject view type to determine where styles should be saved --- .../condition/components/inspector/ConditionalStylesView.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/condition/components/inspector/ConditionalStylesView.vue b/src/plugins/condition/components/inspector/ConditionalStylesView.vue index 4e7168d3ca..45b0c63eef 100644 --- a/src/plugins/condition/components/inspector/ConditionalStylesView.vue +++ b/src/plugins/condition/components/inspector/ConditionalStylesView.vue @@ -173,22 +173,21 @@ export default { return styleProps; }, getDomainObjectFromSelection() { - let layoutItem = {}; let domainObject; if (this.selection[0].length > 1) { //If there are more than 1 items in the this.selection[0] list, the first one could either be a sub domain object OR a layout drawing control. //The second item in the this.selection[0] list is the container object (usually a layout) + let layoutItem = this.selection[0][0].context.layoutItem; const item = this.selection[0][0].context.item; this.canHide = true; - if (item && item.composition) { + if (layoutItem && (layoutItem.type === 'subobject-view')) { domainObject = item; } else { domainObject = this.selection[0][1].context.item; if (!item) { //if this isn't a sub-object this.initialStyles = {}; - layoutItem = this.selection[0][0].context.layoutItem; this.initialStyles = this.getStyleProperties(layoutItem); this.itemId = layoutItem.id; } else {