Fix #131422: Remove OPTYPE_UNDO flag for cursor snapping operators

Cursor snapping operators does not support undo/is not designed to be
undo-able, and currently you can't undo moving of the cursor anyway, so
remove the `OPTYPE_UNDO` flag to make it not show in the undo history.

Pull Request: https://projects.blender.org/blender/blender/pulls/131427
This commit is contained in:
YimingWu
2024-12-13 20:55:22 +01:00
committed by Harley Acheson
parent b3a06149bb
commit c19f83bb50

View File

@@ -714,7 +714,7 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
ot->poll = ED_operator_region_view3d_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->flag = OPTYPE_REGISTER;
}
/** \} */
@@ -905,7 +905,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->flag = OPTYPE_REGISTER;
}
/** \} */
@@ -954,7 +954,7 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->flag = OPTYPE_REGISTER;
}
/** \} */
@@ -988,7 +988,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
ot->poll = ED_operator_view3d_active;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
ot->flag = OPTYPE_REGISTER;
}
/** \} */