[Bf-blender-cvs] [1f9d85f56aa] master: Fix cursor drag failing to use click-start
Campbell Barton
noreply at git.blender.org
Wed Mar 9 07:21:07 CET 2022
Commit: 1f9d85f56aace91e7958566c446e079b7f1c21c6
Author: Campbell Barton
Date: Wed Mar 9 17:18:31 2022 +1100
Branches: master
https://developer.blender.org/rB1f9d85f56aace91e7958566c446e079b7f1c21c6
Fix cursor drag failing to use click-start
Error in b8960267dd51f9108b3b49e9b762e6b4d35ae1dc,
the flag was cleared before use.
===================================================================
M source/blender/editors/transform/transform.c
M source/blender/editors/transform/transform_generics.c
===================================================================
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 9810f1cb6ad..bb80109d8c9 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1706,12 +1706,6 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->launch_event = LEFTMOUSE;
}
- if (options & CTX_CURSOR) {
- /* Cursor should always use the drag start as the combination of click-drag to place & move
- * doesn't work well if the click location isn't used when transforming. */
- t->flag |= T_EVENT_DRAG_START;
- }
-
unit_m3(t->spacemtx);
initTransInfo(C, t, op, event);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 776229d66a0..3b9e2a982dc 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -206,6 +206,12 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->obedit_type = -1;
}
+ if (t->options & CTX_CURSOR) {
+ /* Cursor should always use the drag start as the combination of click-drag to place & move
+ * doesn't work well if the click location isn't used when transforming. */
+ t->flag |= T_EVENT_DRAG_START;
+ }
+
/* Many kinds of transform only use a single handle. */
if (t->data_container == NULL) {
t->data_container = MEM_callocN(sizeof(*t->data_container), __func__);
More information about the Bf-blender-cvs
mailing list