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

This commit is contained in:
Marius Stanciu 2020-10-25 00:54:38 +03:00 committed by Marius
parent 7f97e75d43
commit ac1dd33ae4
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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"]