MenuItem* Menu::FindItemByShortcut(char key) { if (key == 0) return NULL; MenuItemList::Iterator iterator = ItemIterator(); while (MenuItem* item = iterator.Next()) { if (item->Shortcut() == key) return item; } return NULL; }
MenuItem* Menu::FindItemByShortcut(char key) { if (key == 0) return NULL; MenuItemList::Iterator iterator = ItemIterator(); while (MenuItem* item = iterator.Next()) { if (item->Shortcut() == key) return item; } Menu *superMenu = Supermenu(); if (superMenu != NULL) return superMenu->FindItemByShortcut(key); return NULL; }