Skip to content

Commit

Permalink
Item edit: Fix semantic class cleared when property set to None (open…
Browse files Browse the repository at this point in the history
…hab#2325)

On the Item Editor:

Current behaviour, when we have:
Semantic Class: Control
Property: Light

When changing Property to None, it would clear Semantic Class "Control"
too.

The Fix is not to clear the Semantic Class.

Signed-off-by: Jimmy Tanagra <[email protected]>
  • Loading branch information
jimtng authored Feb 9, 2024
1 parent 6f167a5 commit 98271e5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ export default {
this.semanticClass = value
}
this.item.tags = this.item.tags.filter((t) => !this.semanticType(t) && !this.isSemanticPropertyTag(t))
if (!value) return
this.item.tags.push(this.semanticClass)
if (this.semanticClass) this.item.tags.push(this.semanticClass)
if (this.semanticType(this.semanticClass) === 'Point' && this.semanticProperty.length) {
this.item.tags.push(this.semanticProperty)
}
Expand Down

0 comments on commit 98271e5

Please sign in to comment.