[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27494] trunk/blender/source/blender/ editors/transform/transform.c: [#21523] Drag Immediately only working when "Select With" is set to LMB
Martin Poirier
theeth at yahoo.com
Sun Mar 14 19:58:14 CET 2010
Revision: 27494
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27494
Author: theeth
Date: 2010-03-14 19:58:14 +0100 (Sun, 14 Mar 2010)
Log Message:
-----------
[#21523] Drag Immediately only working when "Select With" is set to LMB
Partial fix. Check lauch event if left or right mouse.
Also added a bug fix for manipulator (sometimes, type = 0)
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform.c
Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c 2010-03-14 18:22:04 UTC (rev 27493)
+++ trunk/blender/source/blender/editors/transform/transform.c 2010-03-14 18:58:14 UTC (rev 27494)
@@ -1046,7 +1046,7 @@
/* 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 == LEFTMOUSE /*t->launch_event*/ && t->state != TRANS_STARTING)
+ if (event->type == t->launch_event && (t->launch_event == LEFTMOUSE || t->launch_event == RIGHTMOUSE) && t->state != TRANS_STARTING)
{
t->state = TRANS_CONFIRM;
}
@@ -1456,6 +1456,22 @@
t->launch_event = event ? event->type : -1;
+ if (t->launch_event == EVT_TWEAK_R)
+ {
+ 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)
+ // For manipulator only, so assume LEFTMOUSE
+ else if (t->launch_event == 0)
+ {
+ t->launch_event = LEFTMOUSE;
+ }
+
+
if (!initTransInfo(C, t, op, event)) // internal data, mouse, vectors
{
return 0;
More information about the Bf-blender-cvs
mailing list