diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-03-07 20:45:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-07 20:45:31 +0100 |
| commit | 704d9c3f62c80371518f843deb3b1fb3baa39e6c (patch) | |
| tree | 776eb7c9427cd267b54a86931cc99ade39b1eb09 | |
| parent | 9e6a70f76e4ad4b9d9813b8ed0dfcad5ca1fd501 (diff) | |
update fill method in select_elements extension (#2121)
| -rw-r--r-- | lib/extensions/select_elements.py | 14 | ||||
| -rw-r--r-- | templates/select_elements.xml | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/extensions/select_elements.py b/lib/extensions/select_elements.py index 29fa529b..0d4ce5f1 100644 --- a/lib/extensions/select_elements.py +++ b/lib/extensions/select_elements.py @@ -31,6 +31,8 @@ class SelectElements(InkstitchExtension): pars.add_argument("--select-auto-fill", type=Boolean, dest="fill", default=False) pars.add_argument("--select-contour-fill", type=Boolean, dest="contour", default=False) pars.add_argument("--select-guided-fill", type=Boolean, dest="guided", default=False) + pars.add_argument("--select-meander-fill", type=Boolean, dest="meander", default=False) + pars.add_argument("--select-circular-fill", type=Boolean, dest="circular", default=False) pars.add_argument("--select-legacy-fill", type=Boolean, dest="legacy", default=False) pars.add_argument("--fill-underlay", type=str, dest="fill_underlay", default="all") pars.add_argument("--select-clone", type=Boolean, dest="clone", default=False) @@ -117,13 +119,17 @@ class SelectElements(InkstitchExtension): if not self._select_fill_underlay(element): return False method = element.fill_method - if self.options.fill and method == 0: + if self.options.fill and method == 'auto_fill': select = True - elif self.options.contour and method == 1: + elif self.options.contour and method == 'contour_fill': select = True - elif self.options.guided and method == 2: + elif self.options.guided and method == 'guided_fill': select = True - elif self.options.legacy and method == 3: + elif self.options.meander and method == 'meander_fill': + select = True + elif self.options.circular and method == 'circular_fill': + select = True + elif self.options.legacy and method == 'legacy_fill': select = True return select diff --git a/templates/select_elements.xml b/templates/select_elements.xml index cf9634a2..d1130c20 100644 --- a/templates/select_elements.xml +++ b/templates/select_elements.xml @@ -28,6 +28,8 @@ <param indent="1" name="select-auto-fill" type="boolean" gui-text="Fill">false</param> <param indent="1" name="select-contour-fill" type="boolean" gui-text="Contour Fill">false</param> <param indent="1" name="select-guided-fill" type="boolean" gui-text="Guided Fill">false</param> + <param indent="1" name="select-meander-fill" type="boolean" gui-text="Meander Fill">false</param> + <param indent="1" name="select-circular-fill" type="boolean" gui-text="Circular Fill">false</param> <param indent="1" name="select-legacy-fill" type="boolean" gui-text="Legacy Fill">false</param> <param indent="1" name="fill-underlay" type="optiongroup" appearance="combo" gui-text="Underlay" gui-description="Only select fills with this underlay"> |
