- minor changes in Film Plugin
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -789,19 +789,19 @@ 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
|
||||||
|
if self.units == 'IN':
|
||||||
|
unit = inch
|
||||||
|
else:
|
||||||
|
unit = mm
|
||||||
|
|
||||||
|
if p_size == 'Bounds':
|
||||||
|
page_size = None
|
||||||
|
elif orientation == 'p':
|
||||||
|
page_size = portrait(self.ui.pagesize[p_size])
|
||||||
|
else:
|
||||||
|
page_size = landscape(self.ui.pagesize[p_size])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.units == 'IN':
|
|
||||||
unit = inch
|
|
||||||
else:
|
|
||||||
unit = mm
|
|
||||||
|
|
||||||
if p_size == 'Bounds':
|
|
||||||
page_size = None
|
|
||||||
elif orientation == 'p':
|
|
||||||
page_size = portrait(self.ui.pagesize[p_size])
|
|
||||||
else:
|
|
||||||
page_size = landscape(self.ui.pagesize[p_size])
|
|
||||||
|
|
||||||
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user