Skip to content

Commit

Permalink
Limit remaining Ctrl+{X,V} app shortcut to main canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 4, 2020
1 parent 4e592ae commit 82199f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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 );
Expand Down
6 changes: 0 additions & 6 deletions src/ui/qgisapp.ui
Expand Up @@ -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">
Expand All @@ -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">
Expand Down

0 comments on commit 82199f1

Please sign in to comment.