- minor changes in Film Plugin

This commit is contained in:
Marius Stanciu
2021-09-10 00:12:21 +03:00
committed by Marius
parent 1f0af5fcc8
commit 7fbb63e564
2 changed files with 21 additions and 13 deletions

View File

@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
================================================= =================================================
10.09.2021
- minor changes in Film Plugin
9.09.2021 9.09.2021
- in Fiducials Plugin updated the GUI to the new style - in Fiducials Plugin updated the GUI to the new style

View File

@@ -789,7 +789,6 @@ class Film(AppTool):
self.app.log.error("FilmTool.export_negative() --> PNG output --> %s" % str(e)) self.app.log.error("FilmTool.export_negative() --> PNG output --> %s" % str(e))
return 'fail' return 'fail'
else: # PDF else: # PDF
try:
if self.units == 'IN': if self.units == 'IN':
unit = inch unit = inch
else: else:
@@ -802,6 +801,7 @@ class Film(AppTool):
else: else:
page_size = landscape(self.ui.pagesize[p_size]) page_size = landscape(self.ui.pagesize[p_size])
try:
xmin, ymin, xmax, ymax = obj.bounds() xmin, ymin, xmax, ymax = obj.bounds()
if page_size: if page_size:
page_xmax, page_ymax = ( page_xmax, page_ymax = (
@@ -818,7 +818,11 @@ class Film(AppTool):
"For 'Bounds' page size, it needs to be in the first quadrant.")) "For 'Bounds' page size, it needs to be in the first quadrant."))
self.app.inform.emit(err_msg) self.app.inform.emit(err_msg)
return 'fail' return 'fail'
except Exception as e:
self.app.log.error("FilmTool.export_negative() --> PDF output 1 --> %s" % str(e))
return 'fail'
try:
doc_final = StringIO(doc_final) doc_final = StringIO(doc_final)
drawing = svg2rlg(doc_final) drawing = svg2rlg(doc_final)
@@ -835,7 +839,7 @@ class Film(AppTool):
"Most likely another app is holding the file open and not accessible.")) "Most likely another app is holding the file open and not accessible."))
return 'fail' return 'fail'
except Exception as e: except Exception as e:
self.app.log.error("FilmTool.export_negative() --> PDF output --> %s" % str(e)) self.app.log.error("FilmTool.export_negative() --> PDF output Reportlab section --> %s" % str(e))
return 'fail' return 'fail'
if self.app.defaults["global_open_style"] is False: if self.app.defaults["global_open_style"] is False: