From 0310f5d37d195a12d317574cfc4618aeb72be833 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Wed, 22 May 2024 21:47:01 +0200 Subject: print pdf: remove top level groups (not only layers) (#2924) --- lib/extensions/print_pdf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/extensions/print_pdf.py b/lib/extensions/print_pdf.py index 257d746a..ac71206e 100644 --- a/lib/extensions/print_pdf.py +++ b/lib/extensions/print_pdf.py @@ -27,7 +27,6 @@ from ..i18n import _, get_languages from ..i18n import translation as inkstitch_translation from ..stitch_plan import stitch_groups_to_stitch_plan from ..svg import render_stitch_plan -from ..svg.tags import INKSCAPE_GROUPMODE from ..threads import ThreadCatalog @@ -360,7 +359,7 @@ class Print(InkstitchExtension): # corresponding to each individual color block and a final one # for all color blocks together. - layers = svg.findall("./g[@%s='layer']" % INKSCAPE_GROUPMODE) + layers_and_groups = svg.findall("./g") stitch_plan_layer = svg.findone(".//*[@id='__inkstitch_stitch_plan__']") # Make sure there is no leftover translation from stitch plan preview @@ -373,7 +372,7 @@ class Print(InkstitchExtension): # First, delete all of the other layers. We don't need them and they'll # just bulk up the SVG. - for layer in layers: + for layer in layers_and_groups: if layer is not stitch_plan_layer: svg.remove(layer) -- cgit v1.2.3