Fix cursor drag failing to use click-start

Error in b8960267dd,
the flag was cleared before use.
This commit is contained in:
Campbell Barton 2022-03-09 17:18:31 +11:00
parent 9416004092
commit 1f9d85f56a
2 changed files with 6 additions and 6 deletions

View File

@ -1706,12 +1706,6 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->launch_event = LEFTMOUSE;
}
if (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;
}
unit_m3(t->spacemtx);
initTransInfo(C, t, op, event);

View File

@ -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__);