- added PDF file as type in the Recent File list and capability to load it from there
- PDF's can be drag & dropped on the GUI to be loaded
This commit is contained in:
parent
7442af1b06
commit
8f1a0c1fdc
@ -1838,6 +1838,7 @@ class App(QtCore.QObject):
|
|||||||
'mpf']
|
'mpf']
|
||||||
self.svg_list = ['svg']
|
self.svg_list = ['svg']
|
||||||
self.dxf_list = ['dxf']
|
self.dxf_list = ['dxf']
|
||||||
|
self.pdf_list = ['pdf']
|
||||||
self.prj_list = ['flatprj']
|
self.prj_list = ['flatprj']
|
||||||
|
|
||||||
# global variable used by NCC Tool to signal that some polygons could not be cleared, if True
|
# global variable used by NCC Tool to signal that some polygons could not be cleared, if True
|
||||||
@ -7600,6 +7601,7 @@ class App(QtCore.QObject):
|
|||||||
"project": "share/project16.png",
|
"project": "share/project16.png",
|
||||||
"svg": "share/geometry16.png",
|
"svg": "share/geometry16.png",
|
||||||
"dxf": "share/dxf16.png",
|
"dxf": "share/dxf16.png",
|
||||||
|
"pdf": "share/pdf32.png",
|
||||||
"image": "share/image16.png"
|
"image": "share/image16.png"
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -7612,7 +7614,8 @@ class App(QtCore.QObject):
|
|||||||
'project': self.open_project,
|
'project': self.open_project,
|
||||||
'svg': self.import_svg,
|
'svg': self.import_svg,
|
||||||
'dxf': self.import_dxf,
|
'dxf': self.import_dxf,
|
||||||
'image': self.import_image
|
'image': self.import_image,
|
||||||
|
'pdf': lambda fname: self.worker_task.emit({'fcn': self.pdf_tool.open_pdf, 'params': [fname]})
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open file
|
# Open file
|
||||||
|
@ -11,6 +11,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
22.04.2019
|
22.04.2019
|
||||||
|
|
||||||
|
- added PDF file as type in the Recent File list and capability to load it from there
|
||||||
|
- PDF's can be drag & dropped on the GUI to be loaded
|
||||||
- PDF import tool: added support for save/restore Graphics stack. Only for scale and offset transformations and for the linewidth. This is the final fix for Microsoft PDF printer who saves in PDF format 1.7
|
- PDF import tool: added support for save/restore Graphics stack. Only for scale and offset transformations and for the linewidth. This is the final fix for Microsoft PDF printer who saves in PDF format 1.7
|
||||||
- PDF Import tool: added support for PDF files that embed multiple Gerber layers (top, bottom, outline, silkscreen etc). Each will be opened in it's own Gerber file. The requirement is that each one is drawn in a different color
|
- PDF Import tool: added support for PDF files that embed multiple Gerber layers (top, bottom, outline, silkscreen etc). Each will be opened in it's own Gerber file. The requirement is that each one is drawn in a different color
|
||||||
|
|
||||||
|
@ -3015,6 +3015,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.app.worker_task.emit({'fcn': self.app.import_dxf,
|
self.app.worker_task.emit({'fcn': self.app.import_dxf,
|
||||||
'params': [self.filename, object_type, None]})
|
'params': [self.filename, object_type, None]})
|
||||||
|
|
||||||
|
if extension in self.app.pdf_list:
|
||||||
|
self.app.worker_task.emit({'fcn': self.app.pdf_tool.open_pdf,
|
||||||
|
'params': [self.filename]})
|
||||||
|
|
||||||
if extension in self.app.prj_list:
|
if extension in self.app.prj_list:
|
||||||
# self.app.open_project() is not Thread Safe
|
# self.app.open_project() is not Thread Safe
|
||||||
self.app.open_project(self.filename)
|
self.app.open_project(self.filename)
|
||||||
|
@ -205,7 +205,7 @@ class ToolPDF(FlatCAMTool):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Register recent file
|
# Register recent file
|
||||||
self.app.file_opened.emit("gerber", new_name)
|
self.app.file_opened.emit("gerber", filename)
|
||||||
|
|
||||||
# GUI feedback
|
# GUI feedback
|
||||||
self.app.inform.emit(_("[success] Opened: %s") % filename)
|
self.app.inform.emit(_("[success] Opened: %s") % filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user