Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow copy/paste/remove via ctrl-c/ctrl-v/del in style manager dialog
  • Loading branch information
nyalldawson committed Oct 10, 2021
1 parent 56b9d80 commit 03a1f3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/symbology/qgsstylemanagerdialog.cpp
Expand Up @@ -53,6 +53,7 @@
#include <QClipboard>
#include <QDesktopServices>
#include <QUrl>
#include <QShortcut>

#include "qgsapplication.h"
#include "qgslogger.h"
Expand Down Expand Up @@ -254,6 +255,13 @@ QgsStyleManagerDialog::QgsStyleManagerDialog( QgsStyle *style, QWidget *parent,
mActionPasteItem = new QAction( tr( "Paste Item…" ), this );
connect( mActionPasteItem, &QAction::triggered, this, &QgsStyleManagerDialog::pasteItem );

QShortcut *copyShortcut = new QShortcut( QKeySequence( QKeySequence::StandardKey::Copy ), this );
connect( copyShortcut, &QShortcut::activated, this, &QgsStyleManagerDialog::copyItem );
QShortcut *pasteShortcut = new QShortcut( QKeySequence( QKeySequence::StandardKey::Paste ), this );
connect( pasteShortcut, &QShortcut::activated, this, &QgsStyleManagerDialog::pasteItem );
QShortcut *removeShortcut = new QShortcut( QKeySequence( QKeySequence::StandardKey::Delete ), this );
connect( removeShortcut, &QShortcut::activated, this, &QgsStyleManagerDialog::removeItem );

shareMenu->addSeparator();
shareMenu->addAction( actnExportAsPNG );
shareMenu->addAction( actnExportAsSVG );
Expand Down

0 comments on commit 03a1f3d

Please sign in to comment.