From 2235ec6571601e12be7eb3c74907668fb68bebd4 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 11 Jul 2025 22:14:52 +0200 Subject: Fix issue with bad color names (#3816) * fix issue with bad color names and define element colors at one place and reuse * fix bad tartan color * verify color in gradient block * add thread color tests * use default color behavior for elements linked to non-existing definitions (gradients) * Added mypy change for tests (authored by: CapellanCitizen) --- lib/elements/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/elements/utils.py') diff --git a/lib/elements/utils.py b/lib/elements/utils.py index 6aec1cc2..43c2387d 100644 --- a/lib/elements/utils.py +++ b/lib/elements/utils.py @@ -47,9 +47,9 @@ def node_to_elements(node, clone_to_element=False) -> List[EmbroideryElement]: if not sew_stack.sew_stack_only: element = EmbroideryElement(node) - if element.get_style("fill", "black") and not element.get_style('fill-opacity', 1) == "0": + if element.fill_color is not None and not element.get_style('fill-opacity', 1) == "0": elements.append(FillStitch(node)) - if element.get_style("stroke"): + if element.stroke_color is not None: if element.get_boolean_param("satin_column") and len(element.path) > 1: elements.append(SatinColumn(node)) elif not is_command(element.node): -- cgit v1.2.3