[Bf-blender-cvs] [cc623ee7b0f] master: Transform: do not save settings when canceling the operation
Germano Cavalcante
noreply at git.blender.org
Mon Feb 6 15:17:38 CET 2023
Commit: cc623ee7b0fc5daf1811c096dd065e481ff3bd6d
Author: Germano Cavalcante
Date: Mon Feb 6 11:17:14 2023 -0300
Branches: master
https://developer.blender.org/rBcc623ee7b0fc5daf1811c096dd065e481ff3bd6d
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.
===================================================================
M source/blender/editors/transform/transform.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list