瀏覽代碼

- fixed newly introduced issue when doing File -> Print(PDF)

Marius Stanciu 5 年之前
父節點
當前提交
ac1dd33ae4
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 1 0
      CHANGELOG.md
  2. 5 6
      app_Main.py

+ 1 - 0
CHANGELOG.md

@@ -20,6 +20,7 @@ CHANGELOG for FlatCAM beta
 - the methods of the APP class that were the handlers for the File menu are now moved to their oen class
 - fixed some of the Tcl Commands that depended on the methods refactored above
 - reverted the preprocessors with no toolchange commands to the original but removed the M6 toolchange command
+- fixed newly introduced issue when doing File -> Print(PDF)
 
 23.10.2020
 

+ 5 - 6
app_Main.py

@@ -8019,6 +8019,8 @@ class MenuFileHandlers(QtCore.QObject):
         self.worker_task = self.app.worker_task
         self.defaults = self.app.defaults
 
+        self.pagesize = {}
+
     def on_fileopengerber(self, signal, name=None):
         """
         File menu callback for opening a Gerber.
@@ -9099,8 +9101,7 @@ class MenuFileHandlers(QtCore.QObject):
         color = 'black'
         transparency_level = 1.0
 
-        self.app.pagesize = {}
-        self.app.pagesize.update(
+        self.pagesize.update(
             {
                 'Bounds': None,
                 'A0': (841 * mm, 1189 * mm),
@@ -9158,11 +9159,9 @@ class MenuFileHandlers(QtCore.QObject):
             svg_obj = obj.export_svg(scale_stroke_factor=0.0, scale_factor_x=None, scale_factor_y=None,
                                      skew_factor_x=None, skew_factor_y=None, mirror=None)
 
-            if obj.kind.lower() == 'gerber':
-                # color = self.defaults["gerber_plot_fill"][:-2]
+            if obj.kind.lower() == 'gerber' or obj.kind.lower() == 'excellon':
                 color = obj.fill_color[:-2]
-            elif obj.kind.lower() == 'excellon':
-                color = '#C40000'
+                transparency_level = obj.fill_color[-2:]
             elif obj.kind.lower() == 'geometry':
                 color = self.defaults["global_draw_color"]