- changed the order of the menu entries in the FIle -> Open ...

- organized the list of recent files so the Project entries are to the top and separated from the other types of file
This commit is contained in:
Marius Stanciu
2019-07-31 17:17:08 +03:00
committed by Marius
parent 0d1e960c1c
commit 6242d1809b
3 changed files with 41 additions and 15 deletions

View File

@@ -8293,9 +8293,31 @@ class App(QtCore.QObject):
self.ui.recent.clear() self.ui.recent.clear()
# Create menu items # Create menu items
# First add tbe projects
for recent in self.recent: for recent in self.recent:
filename = recent['filename'].split('/')[-1].split('\\')[-1] filename = recent['filename'].split('/')[-1].split('\\')[-1]
if recent['kind'] == 'project':
try:
action = QtWidgets.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)
# Attach callback
o = make_callback(openers[recent["kind"]], recent['filename'])
action.triggered.connect(o)
self.ui.recent.addAction(action)
except KeyError:
App.log.error("Unsupported file type: %s" % recent["kind"])
# Second, add a separator in the menu
self.ui.recent.addSeparator()
# Then add tbe rest of the files
for recent in self.recent:
filename = recent['filename'].split('/')[-1].split('\\')[-1]
if recent['kind'] != 'project':
try: try:
action = QtWidgets.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self) action = QtWidgets.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)

View File

@@ -9,6 +9,11 @@ CAD program, and create G-Code for Isolation routing.
================================================= =================================================
31.07.2019
- changed the order of the menu entries in the FIle -> Open ...
- organized the list of recent files so the Project entries are to the top and separated from the other types of file
30.07.2019 30.07.2019
- fixed bug that crashed the software when trying to edit a GUI value in Geometry selected tab without having a tool in the Tools Table - fixed bug that crashed the software when trying to edit a GUI value in Geometry selected tab without having a tool in the Tools Table

View File

@@ -79,13 +79,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.menufile_open = self.menufile.addMenu(QtGui.QIcon('share/folder32_bis.png'), _('Open')) self.menufile_open = self.menufile.addMenu(QtGui.QIcon('share/folder32_bis.png'), _('Open'))
self.menufile_open.setToolTipsVisible(True) self.menufile_open.setToolTipsVisible(True)
# Open gerber ... # Open Project ...
self.menufileopenproject = QtWidgets.QAction(QtGui.QIcon('share/folder16.png'), _('Open &Project ...'), self)
self.menufile_open.addAction(self.menufileopenproject)
self.menufile_open.addSeparator()
# Open Gerber ...
self.menufileopengerber = QtWidgets.QAction(QtGui.QIcon('share/flatcam_icon24.png'), self.menufileopengerber = QtWidgets.QAction(QtGui.QIcon('share/flatcam_icon24.png'),
_('Open &Gerber ...\tCTRL+G'), self) _('Open &Gerber ...\tCTRL+G'), self)
self.menufile_open.addAction(self.menufileopengerber) self.menufile_open.addAction(self.menufileopengerber)
self.menufile_open.addSeparator()
# Open Excellon ... # Open Excellon ...
self.menufileopenexcellon = QtWidgets.QAction(QtGui.QIcon('share/open_excellon32.png'), self.menufileopenexcellon = QtWidgets.QAction(QtGui.QIcon('share/open_excellon32.png'),
_('Open &Excellon ...\tCTRL+E'), self) _('Open &Excellon ...\tCTRL+E'), self)
@@ -95,10 +98,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.menufileopengcode = QtWidgets.QAction(QtGui.QIcon('share/code.png'), _('Open G-&Code ...'), self) self.menufileopengcode = QtWidgets.QAction(QtGui.QIcon('share/code.png'), _('Open G-&Code ...'), self)
self.menufile_open.addAction(self.menufileopengcode) self.menufile_open.addAction(self.menufileopengcode)
# Open Project ...
self.menufileopenproject = QtWidgets.QAction(QtGui.QIcon('share/folder16.png'), _('Open &Project ...'), self)
self.menufile_open.addAction(self.menufileopenproject)
self.menufile_open.addSeparator() self.menufile_open.addSeparator()
# Open Config File... # Open Config File...