Event System: match click-drag & tweak event handling for transform
This commit is contained in:
parent
78372d8b9c
commit
426ff481a7
|
@ -1697,7 +1697,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
|
||||
/* Needed to translate tweak events to mouse buttons. */
|
||||
t->launch_event = event ? WM_userdef_event_type_from_keymap_type(event->type) : -1;
|
||||
t->is_launch_event_tweak = event ? ISTWEAK(event->type) : false;
|
||||
t->is_launch_event_drag = event ? (ISTWEAK(event->type) || event->val == KM_CLICK_DRAG) : false;
|
||||
|
||||
/* XXX Remove this when wm_operator_call_internal doesn't use window->eventstate
|
||||
* (which can have type = 0) */
|
||||
|
|
|
@ -592,9 +592,11 @@ typedef struct TransInfo {
|
|||
/*************** NEW STUFF *********************/
|
||||
/** event type used to launch transform. */
|
||||
short launch_event;
|
||||
/** Is the actual launch event a tweak event? (launch_event above is set to the corresponding
|
||||
* mouse button then.) */
|
||||
bool is_launch_event_tweak;
|
||||
/**
|
||||
* Is the actual launch event a drag event?
|
||||
* (`launch_event` is set to the corresponding mouse button then.)
|
||||
*/
|
||||
bool is_launch_event_drag;
|
||||
|
||||
bool is_orient_default_overwrite;
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ static void graph_bezt_get_transform_selection(const TransInfo *t,
|
|||
bool left = use_handle ? ((bezt->f1 & SELECT) != 0) : key;
|
||||
bool right = use_handle ? ((bezt->f3 & SELECT) != 0) : key;
|
||||
|
||||
if (use_handle && t->is_launch_event_tweak) {
|
||||
if (use_handle && t->is_launch_event_drag) {
|
||||
if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_TWEAK_HANDLES_LEFT) {
|
||||
key = right = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue