diff options
Diffstat (limited to 'lib/extensions/params.py')
| -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) |
