From 3ba712f03864776a353a944eb7d64d53890b3f65 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 23 Sep 2016 11:03:40 -0300 Subject: [PATCH] Fix bug assigning keys to menus w/o commands when we search (fix #1260) --- src/app/commands/cmd_keyboard_shortcuts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/commands/cmd_keyboard_shortcuts.cpp b/src/app/commands/cmd_keyboard_shortcuts.cpp index 915eb1667..79d9759ef 100644 --- a/src/app/commands/cmd_keyboard_shortcuts.cpp +++ b/src/app/commands/cmd_keyboard_shortcuts.cpp @@ -75,6 +75,7 @@ public: } Key* key() { return m_key; } + AppMenuItem* menuitem() const { return m_menuitem; } void restoreKeys() { if (m_key && m_keyOrig) @@ -502,7 +503,8 @@ private: KeyItem* copyItem = new KeyItem(itemText, - keyItem->key(), nullptr, 0); + keyItem->key(), + keyItem->menuitem(), 0); searchList()->addChild(copyItem); } }