From e38691be17a6abedc5dccdc6986da7b5cbc8d6d0 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:47:16 +0200 Subject: fix newly introduced param bug: fill without stroke should be possible (#3079) --- lib/extensions/params.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/extensions/params.py') diff --git a/lib/extensions/params.py b/lib/extensions/params.py index 8d5a86ec..9fe5582a 100755 --- a/lib/extensions/params.py +++ b/lib/extensions/params.py @@ -546,9 +546,7 @@ class SettingsPanel(wx.Panel): stitch_groups = [] nodes = [] # move the stroke tab to the end of the list - tabs = self.tabs - stroke_index = [tabs.index(tab) for tab in tabs if tab.name == _("Stroke")][0] - tabs.append(tabs.pop(stroke_index)) + tabs = self.get_stroke_last_tabs() for tab in tabs: tab.apply() if tab.enabled() and not tab.is_dependent_tab(): @@ -586,6 +584,13 @@ class SettingsPanel(wx.Panel): except Exception: wx.CallAfter(self._show_warning, format_uncaught_exception()) + def get_stroke_last_tabs(self): + tabs = self.tabs + stroke_index = [tabs.index(tab) for tab in tabs if tab.name == _("Stroke")] + if stroke_index: + tabs.append(tabs.pop(stroke_index[0])) + return tabs + def on_stitch_plan_rendered(self, stitch_plan): self.simulator.stop() self.simulator.load(stitch_plan) -- cgit v1.2.3