diff framework/MainWindowBase.cpp @ 399:81e41a430b58

Handle keyboard shortcuts with Shift modifier in the same way as those with no modifier
author Chris Cannam
date Mon, 01 Sep 2014 13:37:22 +0100
parents 2f54917f1599
children eb84b06301da
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed Aug 13 16:44:50 2014 +0100
+++ b/framework/MainWindowBase.cpp	Mon Sep 01 13:37:22 2014 +0100
@@ -368,7 +368,14 @@
             }
             if (hasButton) continue;
             QKeySequence sc = a->shortcut();
-            if (sc.count() == 1 && !(sc[0] & Qt::KeyboardModifierMask)) {
+
+            // Note that the set of "single-key shortcuts" that aren't
+            // working and that we need to handle here includes those
+            // with the Shift modifier mask as well as those with no
+            // modifier at all
+            if (sc.count() == 1 &&
+                ((sc[0] & Qt::KeyboardModifierMask) == Qt::NoModifier ||
+                 (sc[0] & Qt::KeyboardModifierMask) == Qt::ShiftModifier)) {
                 QShortcut *newSc = new QShortcut(sc, a->parentWidget());
                 QObject::connect(newSc, SIGNAL(activated()),
                                  m_menuShortcutMapper, SLOT(map()));