diff options
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 0a00da00cea..f8546ad441a 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1116,6 +1116,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA break; default: event = NULL; + break; } switch (context) { @@ -1362,40 +1363,17 @@ int WM_userdef_event_map(int kmitype) { switch (kmitype) { case SELECTMOUSE: - if (U.flag & USER_LMOUSESELECT) - return LEFTMOUSE; - else - return RIGHTMOUSE; - + return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE; case ACTIONMOUSE: - if (U.flag & USER_LMOUSESELECT) - return RIGHTMOUSE; - else - return LEFTMOUSE; - - case WHEELOUTMOUSE: - if (U.uiflag & USER_WHEELZOOMDIR) - return WHEELUPMOUSE; - else - return WHEELDOWNMOUSE; - - case WHEELINMOUSE: - if (U.uiflag & USER_WHEELZOOMDIR) - return WHEELDOWNMOUSE; - else - return WHEELUPMOUSE; - + return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE; case EVT_TWEAK_A: - if (U.flag & USER_LMOUSESELECT) - return EVT_TWEAK_R; - else - return EVT_TWEAK_L; - + return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_R : EVT_TWEAK_L; case EVT_TWEAK_S: - if (U.flag & USER_LMOUSESELECT) - return EVT_TWEAK_L; - else - return EVT_TWEAK_R; + return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_L : EVT_TWEAK_R; + case WHEELOUTMOUSE: + return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELUPMOUSE : WHEELDOWNMOUSE; + case WHEELINMOUSE: + return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELDOWNMOUSE : WHEELUPMOUSE; } return kmitype; |