diff options
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8987325145c..3b9e2a982dc 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -206,6 +206,12 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve t->obedit_type = -1; } + if (t->options & CTX_CURSOR) { + /* Cursor should always use the drag start as the combination of click-drag to place & move + * doesn't work well if the click location isn't used when transforming. */ + t->flag |= T_EVENT_DRAG_START; + } + /* Many kinds of transform only use a single handle. */ if (t->data_container == NULL) { t->data_container = MEM_callocN(sizeof(*t->data_container), __func__); @@ -216,7 +222,12 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve int mval[2]; if (event) { - copy_v2_v2_int(mval, event->mval); + if (t->flag & T_EVENT_DRAG_START) { + WM_event_drag_start_mval(event, region, mval); + } + else { + copy_v2_v2_int(mval, event->mval); + } } else { zero_v2_int(mval); |