update fill method in select_elements extension (#2121)

pull/2124/head
Kaalleen 2023-03-07 20:45:31 +01:00 zatwierdzone przez GitHub
rodzic 9e6a70f76e
commit 704d9c3f62
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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">