Fix T70504: Moving nodes in the node editor stops after hotkey is lifted
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 4 Oct 2019 13:50:42 +0000 (15:50 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 4 Oct 2019 13:55:08 +0000 (15:55 +0200)
This basically reverts 540eb2dc1e57 for an alternative solution that
only enforforces release_confirm [ignoring the preference] on mouse for
the node editor.

Approved by @brecht in T70504.

source/blender/editors/space_node/node_ops.c
source/blender/editors/transform/transform_generics.c

index 5874b6d1cc0217e905d662020dcfaa8feb5761a6..11933ef0811850a2cc461033b4232a900028a074 100644 (file)
@@ -143,7 +143,6 @@ void ED_operatormacros_node(void)
                                     "Move nodes and attach to frame",
                                     OPTYPE_UNDO | OPTYPE_REGISTER);
   mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
-  RNA_boolean_set(mot->ptr, "release_confirm", true);
   WM_operatortype_macro_define(ot, "NODE_OT_attach");
   WM_operatortype_macro_define(ot, "NODE_OT_insert_offset");
 
@@ -153,7 +152,6 @@ void ED_operatormacros_node(void)
                                     "Move nodes and attach to frame",
                                     OPTYPE_UNDO | OPTYPE_REGISTER);
   mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
-  RNA_boolean_set(mot->ptr, "release_confirm", true);
   RNA_boolean_set(mot->ptr, "remove_on_cancel", true);
   WM_operatortype_macro_define(ot, "NODE_OT_attach");
   WM_operatortype_macro_define(ot, "NODE_OT_insert_offset");
index 083b5b94c488b4b44765ceaa09ce8966e44118d4..2dae16da4c3245c355b833ae8f8a6ab7fd94843b 100644 (file)
@@ -1707,7 +1707,8 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
     }
   }
   else {
-    if (ISMOUSE(t->launch_event) && (U.flag & USER_RELEASECONFIRM)) {
+    /* Release confirms preference should not affect node editor (T69288, T70504). */
+    if (ISMOUSE(t->launch_event) && ((U.flag & USER_RELEASECONFIRM) || (t->spacetype == SPACE_NODE))) {
       /* Global "release confirm" on mouse bindings */
       t->flag |= T_RELEASE_CONFIRM;
     }