Skip to content

Commit

Permalink
Attempt to fix #17784, shortcuts in layouts are applied
Browse files Browse the repository at this point in the history
in child widgets on OSX
  • Loading branch information
nyalldawson committed Jan 29, 2018
1 parent 9a020ea commit 8db10ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -370,6 +370,14 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
QShortcut *backSpace = new QShortcut( QKeySequence( QStringLiteral( "Backspace" ) ), this );
connect( backSpace, &QShortcut::activated, mActionDeleteSelection, &QAction::trigger );

#ifdef Q_OS_MAC
// OSX has issues with QShortcut when certain children are focused
ctrlEquals->setParent( mView );
ctrlEquals->setContext( Qt::WidgetWithChildrenShortcut );
backspace->setParent( mView );
backspace->setContext( Qt::WidgetWithChildrenShortcut );
#endif

mActionPreviewModeOff->setChecked( true );
connect( mActionPreviewModeOff, &QAction::triggered, this, [ = ]
{
Expand Down

0 comments on commit 8db10ef

Please sign in to comment.