From f1265801b4647216f4bb572c474ebe2365fff26c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 11 Mar 2021 20:34:29 -0500 Subject: [PATCH] fix two issues with node classification --- lib/extensions/base.py | 6 ++++-- lib/extensions/params.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/extensions/base.py b/lib/extensions/base.py index 1a38973f7..ef5cdd6ac 100644 --- a/lib/extensions/base.py +++ b/lib/extensions/base.py @@ -150,7 +150,7 @@ class InkstitchExtension(inkex.Effect): # command connectors with a fill color set, will glitch into the elements list if is_command(node) or node.get(CONNECTOR_TYPE): - return[] + return [] if self.svg.selected: if node.get("id") in self.svg.selected: @@ -163,7 +163,9 @@ class InkstitchExtension(inkex.Effect): nodes.extend(self.descendants(child, selected, troubleshoot)) if selected: - if getattr(node, "get_path", None): + if node.tag == SVG_GROUP_TAG: + pass + elif getattr(node, "get_path", None): nodes.append(node) elif troubleshoot and (node.tag in NOT_EMBROIDERABLE_TAGS or node.tag in EMBROIDERABLE_TAGS or is_clone(node)): nodes.append(node) diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 910941fe2..71d8339f3 100644 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -9,7 +9,7 @@ from itertools import groupby import wx from wx.lib.scrolledpanel import ScrolledPanel -from ..commands import is_command +from ..commands import is_command, is_command_symbol from ..elements import (AutoFill, Clone, EmbroideryElement, Fill, Polyline, SatinColumn, Stroke) from ..elements.clone import is_clone @@ -466,7 +466,7 @@ class Params(InkstitchExtension): element = EmbroideryElement(node) classes = [] - if not is_command(node): + if not is_command(node) and not is_command_symbol(node): if node.tag == SVG_POLYLINE_TAG: classes.append(Polyline) elif is_clone(node):