- 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:
@@ -8293,20 +8293,42 @@ class App(QtCore.QObject):
|
||||
self.ui.recent.clear()
|
||||
|
||||
# Create menu items
|
||||
# First add tbe projects
|
||||
for recent in self.recent:
|
||||
filename = recent['filename'].split('/')[-1].split('\\')[-1]
|
||||
|
||||
try:
|
||||
action = QtWidgets.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)
|
||||
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)
|
||||
# Attach callback
|
||||
o = make_callback(openers[recent["kind"]], recent['filename'])
|
||||
action.triggered.connect(o)
|
||||
|
||||
self.ui.recent.addAction(action)
|
||||
self.ui.recent.addAction(action)
|
||||
|
||||
except KeyError:
|
||||
App.log.error("Unsupported file type: %s" % recent["kind"])
|
||||
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:
|
||||
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"])
|
||||
|
||||
# Last action in Recent Files menu is one that Clear the content
|
||||
clear_action = QtWidgets.QAction(QtGui.QIcon('share/trash32.png'), (_("Clear Recent files")), self)
|
||||
|
||||
@@ -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
|
||||
|
||||
- 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
|
||||
|
||||
@@ -79,13 +79,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
self.menufile_open = self.menufile.addMenu(QtGui.QIcon('share/folder32_bis.png'), _('Open'))
|
||||
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'),
|
||||
_('Open &Gerber ...\tCTRL+G'), self)
|
||||
self.menufile_open.addAction(self.menufileopengerber)
|
||||
|
||||
self.menufile_open.addSeparator()
|
||||
|
||||
# Open Excellon ...
|
||||
self.menufileopenexcellon = QtWidgets.QAction(QtGui.QIcon('share/open_excellon32.png'),
|
||||
_('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.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()
|
||||
|
||||
# Open Config File...
|
||||
|
||||
Reference in New Issue
Block a user