diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-07-11 17:47:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-11 17:47:16 +0200 |
| commit | e38691be17a6abedc5dccdc6986da7b5cbc8d6d0 (patch) | |
| tree | 92e922259662e1f5395ac18a2d66806749ca2904 /lib | |
| parent | 80d6b5f595c675ef534005aa4bb2b9022396fba6 (diff) | |
fix newly introduced param bug: fill without stroke should be possible (#3079)
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/extensions/params.py | 11 |
1 files changed, 8 insertions, 3 deletions
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) |
