Skip to content

Commit

Permalink
Compare shortcut state through the bitwise AND, because single shortc…
Browse files Browse the repository at this point in the history
…ut can work with multiple states
  • Loading branch information
vpereverzev committed Jan 9, 2020
1 parent 90895e0 commit efced91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mscore/shortcut.cpp
Expand Up @@ -4381,7 +4381,7 @@ void Shortcut::resetToDefault()
Shortcut* Shortcut::getShortcutByKeySequence(const QKeySequence& keySequence, const ScoreState state)
{
for (Shortcut* shortcut : _shortcuts.values()) {
if (shortcut->state() != state)
if (!(shortcut->state() & state))
continue;

QAction* action = shortcut->action();
Expand Down

0 comments on commit efced91

Please sign in to comment.