Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_placement.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 98fb914cda9..05d4372723b 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -733,9 +733,11 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv
* the current cursor location instead of the drag-start. */
if (event->val == KM_CLICK_DRAG) {
/* Set this flag so snapping always updated. */
+ int mval[2];
+ WM_event_drag_start_mval(event, ipd->region, mval);
int flag_orig = snap_state_new->flag;
snap_state_new->flag |= V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE;
- ED_view3d_cursor_snap_data_get(snap_state_new, C, event->mval[0], event->mval[1]);
+ ED_view3d_cursor_snap_data_get(snap_state_new, C, mval[0], mval[1]);
snap_state_new->flag = flag_orig;
}
}
@@ -1151,7 +1153,7 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
RNA_float_set(&op_props, "radius2", 0.0f);
}
- WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &op_props);
+ WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &op_props, NULL);
WM_operator_properties_free(&op_props);
}
else {
@@ -1168,7 +1170,8 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
}
if (do_cursor_update) {
- const float mval_fl[2] = {UNPACK2(event->mval)};
+ float mval_fl[2];
+ WM_event_drag_start_mval_fl(event, region, mval_fl);
/* Calculate the snap location on mouse-move or when toggling snap. */
ipd->is_snap_found = false;