diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-06-04 22:27:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-04 22:27:33 +0200 |
| commit | 952ba0023a2b70de5fd7e5b2bb0d06566ec214e5 (patch) | |
| tree | 8c76bd48869951ab85c7af71c5799575bee5258c /lib/tartan/palette.py | |
| parent | 38206d4eade913cc846e00fd41e85b561e1c926b (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/palette.py')
| -rw-r--r-- | lib/tartan/palette.py | 16 |
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: |
