From cc623ee7b0fc5daf1811c096dd065e481ff3bd6d Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 6 Feb 2023 11:17:14 -0300 Subject: [PATCH] Transform: do not save settings when canceling the operation If we are canceling, the settings must remain the same as before we start the operation. --- source/blender/editors/transform/transform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index d05c78ff993..3c95d480b78 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1484,6 +1484,12 @@ static void drawTransformPixel(const struct bContext *C, ARegion *region, void * void saveTransform(bContext *C, TransInfo *t, wmOperator *op) { + if (t->state == TRANS_CANCEL) { + /* No need to edit operator properties or tool settings if we are canceling the operation. + * These properties must match the original ones. */ + return; + } + ToolSettings *ts = CTX_data_tool_settings(C); PropertyRNA *prop;