- 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:
Marius Stanciu
2019-04-22 19:18:23 +03:00
parent 7442af1b06
commit 8f1a0c1fdc
4 changed files with 11 additions and 2 deletions

View File

@@ -1838,6 +1838,7 @@ class App(QtCore.QObject):
'mpf']
self.svg_list = ['svg']
self.dxf_list = ['dxf']
self.pdf_list = ['pdf']
self.prj_list = ['flatprj']
# 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",
"svg": "share/geometry16.png",
"dxf": "share/dxf16.png",
"pdf": "share/pdf32.png",
"image": "share/image16.png"
}
@@ -7612,7 +7614,8 @@ class App(QtCore.QObject):
'project': self.open_project,
'svg': self.import_svg,
'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