kopia lustrzana https://github.com/inkstitch/inkstitch
add ties checkbox (#619)
rodzic
88a38cce98
commit
6a012b64ee
|
@ -1,9 +1,9 @@
|
||||||
from copy import deepcopy
|
|
||||||
import sys
|
import sys
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
from cspsubdiv import cspsubdiv
|
|
||||||
import cubicsuperpath
|
import cubicsuperpath
|
||||||
import simplestyle
|
import simplestyle
|
||||||
|
from cspsubdiv import cspsubdiv
|
||||||
|
|
||||||
from ..commands import find_commands
|
from ..commands import find_commands
|
||||||
from ..i18n import _
|
from ..i18n import _
|
||||||
|
@ -168,6 +168,17 @@ class EmbroideryElement(object):
|
||||||
width = convert_length(width)
|
width = convert_length(width)
|
||||||
return width * self.stroke_scale
|
return width * self.stroke_scale
|
||||||
|
|
||||||
|
@property
|
||||||
|
@param('ties',
|
||||||
|
_('Ties'),
|
||||||
|
tooltip=_('Add ties. Manual stitch will not add ties.'),
|
||||||
|
type='boolean',
|
||||||
|
default=True,
|
||||||
|
sort_index=4)
|
||||||
|
@cache
|
||||||
|
def ties(self):
|
||||||
|
return self.get_boolean_param("ties", True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def path(self):
|
def path(self):
|
||||||
# A CSP is a "cubic superpath".
|
# A CSP is a "cubic superpath".
|
||||||
|
@ -269,6 +280,10 @@ class EmbroideryElement(object):
|
||||||
|
|
||||||
patches = self.to_patches(last_patch)
|
patches = self.to_patches(last_patch)
|
||||||
|
|
||||||
|
if not self.ties:
|
||||||
|
for patch in patches:
|
||||||
|
patch.stitch_as_is = True
|
||||||
|
|
||||||
if patches:
|
if patches:
|
||||||
patches[-1].trim_after = self.has_command("trim") or self.trim_after
|
patches[-1].trim_after = self.has_command("trim") or self.trim_after
|
||||||
patches[-1].stop_after = self.has_command("stop") or self.stop_after
|
patches[-1].stop_after = self.has_command("stop") or self.stop_after
|
||||||
|
|
Ładowanie…
Reference in New Issue