use sew_stack_enabled variable

pull/3604/head
Kaalleen 2025-03-22 17:39:36 +01:00
rodzic cb4de77919
commit 25df9eef1a
3 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -26,6 +26,7 @@ logger = logging.getLogger("inkstitch.debug") # create module logger with name
# to log messages if previous debug logger is not enabled
logger_inkstich = logging.getLogger("inkstitch") # create module logger with name 'inkstitch'
sew_stack_enabled = safe_get(get_ini(), "DEBUG", "enable_sew_stack", default=False)
# --------------------------------------------------------------------------------------------
# decorator to check if debugging is enabled
@ -84,7 +85,6 @@ class Debug(object):
self.current_layer = None
self.group_stack = []
self.svg_filename = None
self.sew_stack_enabled = safe_get(get_ini(), "DEBUG", "enable_sew_stack", default=False)
def enable(self):
# determine svg filename from logger

Wyświetl plik

@ -9,7 +9,7 @@ from inkex import BaseElement
from lxml.etree import Comment
from ..commands import is_command, layer_commands
from ..debug.debug import debug
from ..debug.debug import sew_stack_enabled
from ..marker import has_marker
from ..svg.tags import (CONNECTOR_TYPE, EMBROIDERABLE_TAGS, INKSCAPE_GROUPMODE,
NOT_EMBROIDERABLE_TAGS, SVG_CLIPPATH_TAG, SVG_DEFS_TAG,
@ -57,7 +57,7 @@ def node_to_elements(node, clone_to_element=False) -> List[EmbroideryElement]:
if element.get_boolean_param("stroke_first", False):
elements.reverse()
if debug.sew_stack_enabled:
if sew_stack_enabled:
elements.append(sew_stack)
return elements

Wyświetl plik

@ -1,9 +1,8 @@
from lib.debug.utils import safe_get
from lib.utils.paths import get_ini
from lib.debug.debug import sew_stack_enabled
def element_count():
element_count = 1
if safe_get(get_ini(), "DEBUG", "sew_stack_enable", default=False):
if sew_stack_enabled:
element_count = 2
return element_count