aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-14 05:52:39 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-14 05:52:39 (GMT)
commite169d33552c8e7070aa6e13da0187f2013b4cfc3 (patch)
treeae9e92c7e885791c7f47645184070cbcd441ab94 /src/FbTk/Menu.cc
parentc82e7c0080f8a5c14dcf95ec92dc42f59ea9dd8b (diff)
parent91ca3bc5c8e2b892a9a81b18246f72aba7deebfd (diff)
downloadfluxbox_pavel-e169d33552c8e7070aa6e13da0187f2013b4cfc3.zip
fluxbox_pavel-e169d33552c8e7070aa6e13da0187f2013b4cfc3.tar.bz2
Merge branch 'master' into to_push
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index ff57bde..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();
@@ -1300,4 +1303,4 @@ void Menu::hideShownMenu() {
1300 shown->hide(); 1303 shown->hide();
1301} 1304}
1302 1305
1303}; // end namespace FbTk 1306} // end namespace FbTk