- added more key shortcuts into the application; they are now displayed in the GUI menu's
- reorganized the Edit -> Preferences -> Global
- redesigned the messagebox that is showed when quiting ot creating a New Project: now it has an option ('Cancel') to abort the process returning to the app
This commit is contained in:
@@ -33,7 +33,7 @@ class FlatCAMTool(QtWidgets.QWidget):
|
||||
|
||||
self.menuAction = None
|
||||
|
||||
def install(self, icon=None, separator=None, **kwargs):
|
||||
def install(self, icon=None, separator=None, shortcut=None, **kwargs):
|
||||
before = None
|
||||
|
||||
# 'pos' is the menu where the Action has to be installed
|
||||
@@ -54,8 +54,13 @@ class FlatCAMTool(QtWidgets.QWidget):
|
||||
# if provided, add an icon to this Action
|
||||
if icon is not None:
|
||||
self.menuAction.setIcon(icon)
|
||||
|
||||
# set the text name of the Action, which will be displayed in the menu
|
||||
self.menuAction.setText(self.toolName)
|
||||
if shortcut is None:
|
||||
self.menuAction.setText(self.toolName)
|
||||
else:
|
||||
self.menuAction.setText(self.toolName + '\t%s' % shortcut)
|
||||
|
||||
# add a ToolTip to the new Action
|
||||
# self.menuAction.setToolTip(self.toolTip) # currently not available
|
||||
|
||||
|
||||
Reference in New Issue
Block a user