mirror of
https://github.com/leozide/leocad.git
synced 2026-07-28 04:07:11 +00:00
Fix shortcut comparison not working for some key combinations.
This commit is contained in:
@@ -1121,7 +1121,9 @@ void lcPreferencesDialog::ShortcutAssignClicked()
|
|||||||
{
|
{
|
||||||
for (uint ExistingIndex = 0; ExistingIndex < LC_ARRAY_COUNT(Shortcuts); ExistingIndex++)
|
for (uint ExistingIndex = 0; ExistingIndex < LC_ARRAY_COUNT(Shortcuts); ExistingIndex++)
|
||||||
{
|
{
|
||||||
if (NewShortcut == Shortcuts[ExistingIndex] && ExistingIndex != ShortcutIndex)
|
QKeySequence Sequence(Shortcuts[ExistingIndex]);
|
||||||
|
|
||||||
|
if (NewShortcut == Sequence.toString(QKeySequence::NativeText) && ExistingIndex != ShortcutIndex)
|
||||||
{
|
{
|
||||||
QString ActionText = qApp->translate("Menu", gCommands[ExistingIndex].MenuName).remove('&').remove(QLatin1String("..."));
|
QString ActionText = qApp->translate("Menu", gCommands[ExistingIndex].MenuName).remove('&').remove(QLatin1String("..."));
|
||||||
QString QuestionText = tr("The shortcut '%1' is already assigned to '%2'. Do you want to replace it?").arg(NewShortcut, ActionText);
|
QString QuestionText = tr("The shortcut '%1' is already assigned to '%2'. Do you want to replace it?").arg(NewShortcut, ActionText);
|
||||||
|
|||||||
Reference in New Issue
Block a user