a-z menu input now works for enum popups.

This commit is contained in:
Campbell Barton
2012-09-11 22:55:27 +00:00
parent f0ea636b67
commit ed6215bff1
2 changed files with 2 additions and 2 deletions

View File

@@ -759,7 +759,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
* fun first pass on all buttons so first word chars always get first priority */ * fun first pass on all buttons so first word chars always get first priority */
for (but = block->buttons.first; but; but = but->next) { for (but = block->buttons.first; but; but = but->next) {
if (!ELEM4(but->type, BUT, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) { if (!ELEM5(but->type, BUT, BUTM, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) {
/* pass */ /* pass */
} }
else if (but->menu_key == '\0') { else if (but->menu_key == '\0') {

View File

@@ -6414,7 +6414,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
for (but = block->buttons.first; but; but = but->next) { for (but = block->buttons.first; but; but = but->next) {
if (but->menu_key == event->type) { if (but->menu_key == event->type) {
if (but->type == BUT) { if (ELEM(but->type, BUT, BUTM)) {
/* mainly for operator buttons */ /* mainly for operator buttons */
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY); ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY);
} }