summaryrefslogtreecommitdiff
path: root/lib/tartan
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-06-04 22:27:33 +0200
committerGitHub <noreply@github.com>2024-06-04 22:27:33 +0200
commit952ba0023a2b70de5fd7e5b2bb0d06566ec214e5 (patch)
tree8c76bd48869951ab85c7af71c5799575bee5258c /lib/tartan
parent38206d4eade913cc846e00fd41e85b561e1c926b (diff)
Update tartan gui (#2965)
* update tartan gui * params settings size * fix issue with set_precision * fix issue with linear gradient * do not add ignore layer command to png rerealistic output
Diffstat (limited to 'lib/tartan')
-rw-r--r--lib/tartan/palette.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/tartan/palette.py b/lib/tartan/palette.py
index 2e33fbc8..d945eb83 100644
--- a/lib/tartan/palette.py
+++ b/lib/tartan/palette.py
@@ -59,18 +59,10 @@ class Palette:
stripes = []
for stripe_sizer in outer_sizer.Children:
stripe = {'render': 1, 'color': '#000000', 'width': '5'}
- stripe_info = stripe_sizer.GetSizer()
- for color in stripe_info.GetChildren():
- widget = color.GetWindow()
- if isinstance(widget, wx.CheckBox):
- # in embroidery it is ok to have gaps between the stripes
- stripe['render'] = widget.Get3StateValue()
- elif isinstance(widget, wx.ColourPickerCtrl):
- stripe['color'] = widget.GetColour().GetAsString(wx.C2S_HTML_SYNTAX)
- elif isinstance(widget, wx.SpinCtrlDouble):
- stripe['width'] = widget.GetValue()
- elif isinstance(widget, wx.Button) or isinstance(widget, wx.StaticText):
- continue
+ stripe_panel = stripe_sizer.GetWindow()
+ stripe['render'] = stripe_panel.visibility.Get3StateValue()
+ stripe['color'] = stripe_panel.colorpicker.GetColour().GetAsString(wx.C2S_HTML_SYNTAX)
+ stripe['width'] = stripe_panel.stripe_width.GetValue()
stripes.append(stripe)
self.palette_stripes[i] = stripes
if self.equal_warp_weft: