Skip to content

Commit

Permalink
macOS: fix shortcut even for processing tool button
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Feb 13, 2018
1 parent 27cbfaf commit abeef25
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit abeef25

Please sign in to comment.