Merged changes in the trunk up to revision 27992.
[blender.git] / source / blender / editors / transform / transform.c
index 247de5ab33810bed29f1d73ae14a9f92f9cc948c..59b0d26d00a182a911df63663fd4aba9f78fe045 100644 (file)
@@ -1029,10 +1029,13 @@ int transformEvent(TransInfo *t, wmEvent *event)
                }
 
                /* confirm transform if launch key is released after mouse move */
-               /* XXX Keyrepeat bug in Xorg fucks this up, will test when fixed */
-               if (event->type == t->launch_event && (t->launch_event == LEFTMOUSE || t->launch_event == RIGHTMOUSE) && t->state != TRANS_STARTING)
+               if (t->flag & T_RELEASE_CONFIRM)
                {
-                       t->state = TRANS_CONFIRM;
+                       /* XXX Keyrepeat bug in Xorg fucks this up, will test when fixed */
+                       if (event->type == t->launch_event && (t->launch_event == LEFTMOUSE || t->launch_event == RIGHTMOUSE))
+                       {
+                               t->state = TRANS_CONFIRM;
+                       }
                }
        }
 
@@ -1440,16 +1443,13 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
 
        t->launch_event = event ? event->type : -1;
 
-       if (U.flag & USER_DRAGIMMEDIATE)
+       if (t->launch_event == EVT_TWEAK_R)
        {
-               if (t->launch_event == EVT_TWEAK_R)
-               {
-                       t->launch_event = RIGHTMOUSE;
-               }
-               else if (t->launch_event == EVT_TWEAK_L)
-               {
-                       t->launch_event = LEFTMOUSE;
-               }
+               t->launch_event = RIGHTMOUSE;
+       }
+       else if (t->launch_event == EVT_TWEAK_L)
+       {
+               t->launch_event = LEFTMOUSE;
        }
 
        // XXX Remove this when wm_operator_call_internal doesn't use window->eventstate (which can have type = 0)