Skip to content
Permalink
Browse files

Also restrict scope of Ctrl+A select all shortcut to avoid ambiguity

  • Loading branch information
nyalldawson committed Jun 3, 2020
1 parent 873716c commit 33fb57e4a00247c6695488745a6aabae5217aeae
Showing with 6 additions and 4 deletions.
  1. +1 −0 python/console/console_output.py
  2. +5 −1 src/app/qgisapp.cpp
  3. +0 −3 src/ui/qgisapp.ui
@@ -171,6 +171,7 @@ def __init__(self, parent=None):
self.copyShortcut.setContext(Qt.WidgetWithChildrenShortcut)
self.copyShortcut.activated.connect(self.copy)
self.selectAllShortcut = QShortcut(QKeySequence.SelectAll, self)
self.selectAllShortcut.setContext(Qt.WidgetWithChildrenShortcut)
self.selectAllShortcut.activated.connect(self.selectAll)

def insertInitText(self):
@@ -2816,11 +2816,15 @@ void QgisApp::createActions()

connect( mActionDiagramProperties, &QAction::triggered, this, &QgisApp::diagramProperties );

// we can't set the shortcut on the copy action, because we need to restrict it's context to the canvas and it's children..
// we can't set the shortcut these actions, because we need to restrict their context to the canvas and it's children..
QShortcut *copyShortcut = new QShortcut( QKeySequence::Copy, mMapCanvas );
copyShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( copyShortcut, &QShortcut::activated, this, [ = ] { copySelectionToClipboard(); } );

QShortcut *selectAllShortcut = new QShortcut( QKeySequence::SelectAll, mMapCanvas );
selectAllShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( selectAllShortcut, &QShortcut::activated, this, &QgisApp::selectAll );

#ifndef HAVE_POSTGRESQL
delete mActionAddPgLayer;
mActionAddPgLayer = 0;
@@ -1253,9 +1253,6 @@
<property name="toolTip">
<string>Select All Features</string>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
</property>
</action>
<action name="mActionInvertSelection">
<property name="icon">

0 comments on commit 33fb57e

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