diff options
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 4b73b41..ec60b24 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -243,6 +243,8 @@ int Menu::remove(unsigned int index) { | |||
243 | MenuItem *item = (*it); | 243 | MenuItem *item = (*it); |
244 | 244 | ||
245 | if (item) { | 245 | if (item) { |
246 | if (!m_matches.empty()) | ||
247 | resetTypeAhead(); | ||
246 | menuitems.erase(it); | 248 | menuitems.erase(it); |
247 | // avoid O(n^2) algorithm with removeAll() | 249 | // avoid O(n^2) algorithm with removeAll() |
248 | if (index != menuitems.size()) | 250 | if (index != menuitems.size()) |
@@ -511,6 +513,7 @@ void Menu::show() { | |||
511 | updateMenu(); | 513 | updateMenu(); |
512 | 514 | ||
513 | m_type_ahead.reset(); | 515 | m_type_ahead.reset(); |
516 | m_matches.clear(); | ||
514 | 517 | ||
515 | menu.window.showSubwindows(); | 518 | menu.window.showSubwindows(); |
516 | menu.window.show(); | 519 | menu.window.show(); |