Skip to content

Commit

Permalink
shortcut config. dialog: display correctly keysequence on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Feb 13, 2018
1 parent 856dd08 commit 27cbfaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gui/qgsconfigureshortcutsdialog.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 );
}
Expand Down

0 comments on commit 27cbfaf

Please sign in to comment.