Merging r58464 through r58474 from trunk into soc-2013-depsgraph_mt
[blender.git] / source / blender / windowmanager / intern / wm_event_system.c
index 74a3fb2b0776582517d5f2a7d81505f299e6de2a..659eff3b6b124bd7bbb43ce44a2e63026c184788 100644 (file)
@@ -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;