- improved how the PDF printing works: now the Excellon files are always on top and from the rest of objects the first selected is on top, below the Excellons

This commit is contained in:
Marius Stanciu
2022-03-30 17:57:41 +03:00
committed by Marius
parent c0b3f6ebde
commit 7f9a23c41c
2 changed files with 9 additions and 1 deletions

View File

@@ -10696,6 +10696,13 @@ class MenuFileHandlers(QtCore.QObject):
}
)
# make sure that the Excellon objeacts are drawn on top of everything
excellon_objs = [obj for obj in obj_selection if obj.kind == 'excellon']
# reverse the object order such that the first selected is on top
non_excellon_objs = [obj for obj in obj_selection if obj.kind != 'excellon'][::-1]
obj_selection = non_excellon_objs + excellon_objs
# generate the SVG files from the application objects
exported_svg = []
for obj in obj_selection:
svg_obj = obj.export_svg(scale_stroke_factor=0.0)