diff options
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index a24ff9960e2..7d1d9d7f279 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6344,7 +6344,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * } /* handle keyframing */ else if ((event->type == IKEY) && - !ELEM(KM_MOD_FIRST, event->ctrl, event->oskey) && + (event->ctrl + event->oskey == 0) && (event->val == KM_PRESS)) { if (event->alt) { @@ -6365,7 +6365,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * } /* handle drivers */ else if ((event->type == DKEY) && - !ELEM(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && + ((event->ctrl + event->oskey + event->shift) == 0) && (event->val == KM_PRESS)) { if (event->alt) @@ -6379,7 +6379,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * } /* handle keyingsets */ else if ((event->type == KKEY) && - !ELEM(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && + ((event->ctrl + event->oskey + event->shift) == 0) && (event->val == KM_PRESS)) { if (event->alt) @@ -6392,9 +6392,9 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * return WM_UI_HANDLER_BREAK; } /* handle menu */ - else if (event->type == RIGHTMOUSE && - event->val == KM_PRESS && - ((event->ctrl + event->alt + event->shift) == 0)) + else if ((event->type == RIGHTMOUSE) && + ((event->ctrl + event->alt + event->shift) == 0) && + (event->val == KM_PRESS)) { /* RMB has two options now */ if (ui_but_menu(C, but)) { diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index e68c86353a3..d0637a23a70 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1757,7 +1757,7 @@ int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *ar) /* XXX hardcoded key warning */ if ((inside || inside_header) && event->val == KM_PRESS) { - if (event->type == AKEY && !ELEM(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift, event->alt)) { + if (event->type == AKEY && ((event->ctrl + event->oskey + event->shift + event->alt) == 0)) { if (pa->flag & PNL_CLOSEDY) { if ((block->rect.ymax <= my) && (block->rect.ymax + PNL_HEADER >= my)) |