From 5de1144565fdd4b39f3e7e8c94c6a9650ce13ba0 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 30 Mar 2022 18:18:07 +0300 Subject: [PATCH] - when doing PDF printing, the cncjob objects are prioritized and placed on top of Gerber objects --- CHANGELOG.md | 1 + appMain.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8502fb75..917e7c66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ CHANGELOG for FlatCAM Evo beta - when changing workspace orientation fixed leaving behind the old frame on the canvas - 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 - when doing PDF printing and no object is selected now the default action is to print everything that fits within the workspace +- when doing PDF printing, the cncjob objects are prioritized and placed on top of Gerber objects 29.03.2022 diff --git a/appMain.py b/appMain.py index 32280d66..40e17bbf 100644 --- a/appMain.py +++ b/appMain.py @@ -10699,9 +10699,10 @@ 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'] + cncjob_objs =[obj for obj in obj_selection if obj.kind == 'cncjob'] # 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 + rest_objs = [obj for obj in obj_selection if obj.kind != 'excellon' and obj.kind != 'cncjob'][::-1] + obj_selection = rest_objs + cncjob_objs + excellon_objs # generate the SVG files from the application objects exported_svg = []