Skip to content
Permalink
Browse files

macOS: fix shortcut even for processing tool button

  • Loading branch information
slarosa committed Feb 13, 2018
1 parent 27cbfaf commit abeef2573c2a96b553c015af60ac6d6cac1fc653
Showing with 10 additions and 5 deletions.
  1. +10 −5 python/plugins/processing/ProcessingPlugin.py
@@ -40,7 +40,7 @@
QgsCustomDropHandler)
from qgis.PyQt.QtCore import Qt, QCoreApplication, QDir, QFileInfo
from qgis.PyQt.QtWidgets import QMenu, QAction
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtGui import QIcon, QKeySequence

from processing.core.Processing import Processing
from processing.gui.AlgorithmDialog import AlgorithmDialog
@@ -189,7 +189,8 @@ def initGui(self):
self.toolboxAction.setObjectName('toolboxAction')
self.toolboxAction.setIcon(
QgsApplication.getThemeIcon("/processingAlgorithm.svg"))
self.iface.registerMainWindowAction(self.toolboxAction, 'Ctrl+Alt+T')
self.iface.registerMainWindowAction(self.toolboxAction,
QKeySequence('Ctrl+Alt+T').toString(QKeySequence.NativeText))
self.toolboxAction.toggled.connect(self.openToolbox)
self.iface.attributesToolBar().insertAction(self.iface.actionOpenStatisticalSummary(), self.toolboxAction)
self.menu.addAction(self.toolboxAction)
@@ -199,23 +200,27 @@ def initGui(self):
self.tr('Graphical &Modeler...'), self.iface.mainWindow())
self.modelerAction.setObjectName('modelerAction')
self.modelerAction.triggered.connect(self.openModeler)
self.iface.registerMainWindowAction(self.modelerAction, 'Ctrl+Alt+M')
self.iface.registerMainWindowAction(self.modelerAction,
QKeySequence('Ctrl+Alt+M').toString(QKeySequence.NativeText))
self.menu.addAction(self.modelerAction)

self.historyAction = QAction(
QIcon(os.path.join(pluginPath, 'images', 'history.svg')),
self.tr('&History...'), self.iface.mainWindow())
self.historyAction.setObjectName('historyAction')
self.historyAction.triggered.connect(self.openHistory)
self.iface.registerMainWindowAction(self.historyAction, 'Ctrl+Alt+H')
self.iface.registerMainWindowAction(self.historyAction,
QKeySequence('Ctrl+Alt+H').toString(QKeySequence.NativeText))
self.menu.addAction(self.historyAction)
self.toolbox.processingToolbar.addAction(self.historyAction)

self.resultsAction = QAction(
QgsApplication.getThemeIcon("/processingResult.svg"),
self.tr('&Results Viewer'), self.iface.mainWindow())
self.resultsAction.setCheckable(True)
self.iface.registerMainWindowAction(self.resultsAction, 'Ctrl+Alt+R')
self.iface.registerMainWindowAction(self.resultsAction,
QKeySequence('Ctrl+Alt+R').toString(QKeySequence.NativeText))

self.menu.addAction(self.resultsAction)
self.toolbox.processingToolbar.addAction(self.resultsAction)
self.resultsDock.visibilityChanged.connect(self.resultsAction.setChecked)

0 comments on commit abeef25

Please sign in to comment.
You can’t perform that action at this time.