Hack to make people stop bugging me.

Working around a problem in a work around for holes in the operator API and event system.
This commit is contained in:
Martin Poirier 2010-03-19 03:26:31 +00:00
parent cd9e6253c3
commit 5e7b1bde8d

@ -1456,17 +1456,21 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
t->launch_event = event ? event->type : -1;
if (t->launch_event == EVT_TWEAK_R)
if (U.flag & USER_DRAGIMMEDIATE)
{
t->launch_event = RIGHTMOUSE;
}
else if (t->launch_event == EVT_TWEAK_L)
{
t->launch_event = LEFTMOUSE;
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)
if (t->launch_event == 0)
{
t->launch_event = LEFTMOUSE;
}