1
0
Fork 0

prevent target duplication

This commit is contained in:
Kevin Matz 2018-10-20 23:37:58 -04:00
parent 52c67c831b
commit c352384822
1 changed files with 2 additions and 0 deletions

View File

@ -237,6 +237,7 @@ class OscCommentMacroListener(CommentMacroListener):
ctx.targets = []
def exitMaster(self, ctx: CommentMacroParser.MasterContext):
ctx.targets = set(ctx.targets) # no duplicates
if isinstance(ctx.parentCtx, CommentMacroParser.MacroContext):
ctx.parentCtx.master = ctx
@ -264,4 +265,5 @@ class OscCommentMacroListener(CommentMacroListener):
ctx.targets = []
def exitTarget(self, ctx: CommentMacroParser.TargetContext):
ctx.target = set(ctx.targets) # no duplicates
ctx.parentCtx.targets.extend(ctx.targets)