From 4681987d92c7de644fd3abddb726fa2300b59486 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 7 Mar 2022 07:46:24 +0100 Subject: [PATCH] Fix T96156: Snap to 3D cursor can't be undone Caused by oversight in 2bcf93bbbeb. Operator returns `OPERATOR_CANCELLED` when it should return `OPERATOR_FINISHED`. Reviewed By: mano-wii, campbellbarton Differential Revision: https://developer.blender.org/D14243 --- source/blender/editors/space_view3d/view3d_snap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 4334ede0a06..29e5917c7ed 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -616,9 +616,9 @@ static int snap_selected_to_cursor_exec(bContext *C, wmOperator *op) const int pivot_point = scene->toolsettings->transform_pivot_point; if (snap_selected_to_location(C, snap_target_global, use_offset, pivot_point, true)) { - return OPERATOR_CANCELLED; + return OPERATOR_FINISHED; } - return OPERATOR_FINISHED; + return OPERATOR_CANCELLED; } void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)