- fixed printing a CNCJob object with File -> Print(PDF) functionality by adding a root element if both travels and cuts are present

This commit is contained in:
Marius Stanciu
2021-10-28 20:33:32 +03:00
committed by Marius Stanciu
parent de4c51b480
commit 4ed8512cac
2 changed files with 5 additions and 0 deletions

View File

@@ -7688,6 +7688,10 @@ class CNCjob(Geometry):
if cuts:
svg_elem += cutsgeom.svg(scale_factor=scale_stroke_factor, stroke_color="#5E6CFF")
# if both are true then we need a root element <g>
if travels and cuts:
svg_elem = "<g>" + svg_elem + "</g>"
return svg_elem
def bounds(self, flatten=None):