From dfc7341ab71d0d104d620bbf29e95e35d5cc40bb Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Thu, 16 Jul 2026 22:29:50 -0700 Subject: [PATCH] Fix shortcut comparison not working for some key combinations. --- qt/lc_qpreferencesdialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index 99826ee5..92bf58d8 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -1121,7 +1121,9 @@ void lcPreferencesDialog::ShortcutAssignClicked() { 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 QuestionText = tr("The shortcut '%1' is already assigned to '%2'. Do you want to replace it?").arg(NewShortcut, ActionText);