Fix #110722: Wrong value when starting a transformation

Caused by 5ed14e9269.

That commit accidentally removed the `copy_v2_v2_int(t->mval, mval);`
line which was responsible for initializing the value of `mval`.
This commit is contained in:
Germano Cavalcante
2023-08-02 15:49:15 -03:00
parent f1d44dd64a
commit c59ba19c0b
2 changed files with 2 additions and 9 deletions

View File

@@ -2023,14 +2023,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
}
float2 mval;
if (t->flag & T_EVENT_DRAG_START) {
WM_event_drag_start_mval_fl(event, t->region, mval);
}
else {
mval = float2(event->mval);
}
initMouseInput(t, &t->mouse, t->center2d, mval, use_accurate);
initMouseInput(t, &t->mouse, t->center2d, t->mval, use_accurate);
}
transform_mode_init(t, op, mode);

View File

@@ -186,7 +186,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
mval = float2(0, 0);
}
t->mouse.imval = mval;
t->mval = mval;
t->mode_info = nullptr;