Transform: Replace t->imval w/ t->mouse.imval

Initial mouse position was saved in two different places

D1588 by @mauge
This commit is contained in:
2015-10-28 22:56:09 +11:00
parent d1e18c35d3
commit e0c60985b6
6 changed files with 29 additions and 31 deletions

View File

@@ -1112,19 +1112,18 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->redraw = TREDRAW_HARD; /* redraw first time */
if (event) {
copy_v2_v2_int(t->imval, event->mval);
t->event_type = event->type;
}
else {
t->imval[0] = 0;
t->imval[1] = 0;
t->mouse.imval[0] = 0;
t->mouse.imval[1] = 0;
}
t->con.imval[0] = t->imval[0];
t->con.imval[1] = t->imval[1];
t->con.imval[0] = t->mouse.imval[0];
t->con.imval[1] = t->mouse.imval[1];
t->mval[0] = t->imval[0];
t->mval[1] = t->imval[1];
t->mval[0] = t->mouse.imval[0];
t->mval[1] = t->mouse.imval[1];
t->transform = NULL;
t->handleEvent = NULL;