summaryrefslogtreecommitdiff
path: root/lib/extensions/params.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions/params.py')
-rwxr-xr-xlib/extensions/params.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/extensions/params.py b/lib/extensions/params.py
index dd5c427c..0cac9365 100755
--- a/lib/extensions/params.py
+++ b/lib/extensions/params.py
@@ -563,12 +563,12 @@ class SettingsPanel(wx.Panel):
try:
wx.CallAfter(self._hide_warning)
last_stitch_group = None
- for node in nodes:
+ for node, next_node in zip_longest(nodes, self._get_next_nodes(nodes)):
# Making a copy of the embroidery element is an easy
# way to drop the cache in the @cache decorators used
# for many params in embroider.py.
- stitch_groups.extend(copy(node).embroider(last_stitch_group))
+ stitch_groups.extend(copy(node).embroider(last_stitch_group, next_node))
if stitch_groups:
last_stitch_group = stitch_groups[-1]
@@ -587,6 +587,11 @@ class SettingsPanel(wx.Panel):
except Exception:
wx.CallAfter(self._show_warning, format_uncaught_exception())
+ def _get_next_nodes(self, nodes):
+ if len(nodes) > 1:
+ return nodes[1:]
+ return []
+
def get_stroke_last_tabs(self):
tabs = self.tabs
stroke_index = [tabs.index(tab) for tab in tabs if tab.name == _("Stroke")]