Skip to content
Permalink
Browse files

shortcut config. dialog: display correctly keysequence on macOS

  • Loading branch information
slarosa committed Feb 13, 2018
1 parent 856dd08 commit 27cbfafdb5204d903a4017827ff3708ed4ef2b9d
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/gui/qgsconfigureshortcutsdialog.cpp
@@ -69,13 +69,13 @@ void QgsConfigureShortcutsDialog::populateActions()
{
actionText = action->text();
actionText.remove( '&' ); // remove the accelerator
sequence = action->shortcut().toString();
sequence = action->shortcut().toString( QKeySequence::NativeText );
icon = action->icon();
}
else if ( QShortcut *shortcut = qobject_cast< QShortcut * >( obj ) )
{
actionText = shortcut->whatsThis();
sequence = shortcut->key().toString();
sequence = shortcut->key().toString( QKeySequence::NativeText );
icon = shortcut->property( "Icon" ).value<QIcon>();
}
else
@@ -391,7 +391,7 @@ void QgsConfigureShortcutsDialog::updateShortcutText()
{
// update text of the button so that user can see what has typed already
QKeySequence s( mModifiers + mKey );
btnChangeShortcut->setText( tr( "Input: " ) + s.toString() );
btnChangeShortcut->setText( tr( "Input: " ) + s.toString( QKeySequence::NativeText ) );
}

void QgsConfigureShortcutsDialog::setGettingShortcut( bool getting )
@@ -449,10 +449,10 @@ void QgsConfigureShortcutsDialog::setCurrentActionShortcut( const QKeySequence &
}

// update manager
mManager->setObjectKeySequence( object, s.toString() );
mManager->setObjectKeySequence( object, s.toString( QKeySequence::NativeText ) );

// update gui
treeActions->currentItem()->setText( 1, s.toString() );
treeActions->currentItem()->setText( 1, s.toString( QKeySequence::NativeText ) );

actionChanged( treeActions->currentItem(), nullptr );
}

0 comments on commit 27cbfaf

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