From 704d9c3f62c80371518f843deb3b1fb3baa39e6c Mon Sep 17 00:00:00 2001
From: Kaalleen <36401965+kaalleen@users.noreply.github.com>
Date: Tue, 7 Mar 2023 20:45:31 +0100
Subject: update fill method in select_elements extension (#2121)
---
lib/extensions/select_elements.py | 14 ++++++++++----
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 @@
false
false
false
+ false
+ false
false
--
cgit v1.2.3