Fix #109847: Inconsistent panning in editors
Not updating `deltax/deltay` property values of the `VIEW2D_OT_pan` operator can cause reusing delta values from previous modal iterations. Pull Request: https://projects.blender.org/blender/blender/pulls/110547
This commit is contained in:
committed by
Julian Eisel
parent
a186f5e48a
commit
b05d44b75b
@@ -294,15 +294,15 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
}
|
||||
|
||||
if (deltax != 0) {
|
||||
RNA_int_set(op->ptr, "deltax", deltax);
|
||||
vpd->lastx = event->xy[0];
|
||||
}
|
||||
if (deltay != 0) {
|
||||
RNA_int_set(op->ptr, "deltay", deltay);
|
||||
vpd->lasty = event->xy[1];
|
||||
}
|
||||
|
||||
if (deltax || deltay) {
|
||||
RNA_int_set(op->ptr, "deltax", deltax);
|
||||
RNA_int_set(op->ptr, "deltay", deltay);
|
||||
view_pan_apply(C, op);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user