Skip to content
Permalink
Browse files

Limit remaining Ctrl+{X,V} app shortcut to main canvas

  • Loading branch information
nirvn committed Jun 4, 2020
1 parent 4e592ae commit 82199f1058ffe9888cf0ed883d2bc04c0ba7a89e
Showing with 8 additions and 6 deletions.
  1. +8 −0 src/app/qgisapp.cpp
  2. +0 −6 src/ui/qgisapp.ui
@@ -2821,6 +2821,14 @@ void QgisApp::createActions()
copyShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( copyShortcut, &QShortcut::activated, this, [ = ] { copySelectionToClipboard(); } );

QShortcut *cutShortcut = new QShortcut( QKeySequence::Cut, mMapCanvas );
cutShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( cutShortcut, &QShortcut::activated, this, [ = ] { cutSelectionToClipboard(); } );

QShortcut *pasteShortcut = new QShortcut( QKeySequence::Paste, mMapCanvas );
pasteShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( pasteShortcut, &QShortcut::activated, this, [ = ] { pasteFromClipboard(); } );

QShortcut *selectAllShortcut = new QShortcut( QKeySequence::SelectAll, mMapCanvas );
selectAllShortcut->setContext( Qt::WidgetWithChildrenShortcut );
connect( selectAllShortcut, &QShortcut::activated, this, &QgisApp::selectAll );
@@ -882,9 +882,6 @@
<property name="text">
<string>Cut Features</string>
</property>
<property name="shortcut">
<string>Ctrl+X</string>
</property>
</action>
<action name="mActionCopyFeatures">
<property name="icon">
@@ -903,9 +900,6 @@
<property name="text">
<string>Paste Features</string>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
</property>
</action>
<action name="mActionAddFeature">
<property name="checkable">

0 comments on commit 82199f1

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