diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index 1b365d6ea..25c519b05 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -71,12 +71,11 @@ public: } void restoreKeys() { - if (m_key) { - if (m_keyOrig) - *m_key = *m_keyOrig; - else if (m_menuitem) - m_menuitem->setKey(NULL); - } + if (m_key && m_keyOrig) + *m_key = *m_keyOrig; + + if (m_menuitem && !m_keyOrig) + m_menuitem->setKey(NULL); } private: