[#19760] Extrude + Continuous Grab doesn't work
authorMartin Poirier <theeth@yahoo.com>
Tue, 17 Nov 2009 16:48:43 +0000 (16:48 +0000)
committerMartin Poirier <theeth@yahoo.com>
Tue, 17 Nov 2009 16:48:43 +0000 (16:48 +0000)
Flag macro as blocking

Make macro copy operator flags when one of them returns MODAL (these flags are needed by the event system)

source/blender/editors/mesh/mesh_ops.c
source/blender/windowmanager/intern/wm_operators.c

index 215f895f953f87eb94b1e91bbb0350c6662b3c9f..bf43c39a7ee6d56fdaf5666bd77119089890427c 100644 (file)
@@ -176,7 +176,7 @@ void ED_operatormacros_mesh(void)
        otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
 
-       ot= WM_operatortype_append_macro("MESH_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+       ot= WM_operatortype_append_macro("MESH_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER|OPTYPE_BLOCKING);
        WM_operatortype_macro_define(ot, "MESH_OT_extrude");
        otmacro= WM_operatortype_macro_define(ot, "TFM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
index 97601a8e65f3d44bd14adc9844407b45f5706f10..892deea20812d17c305eae36c69b4cb492af797b 100644 (file)
@@ -207,6 +207,10 @@ static int wm_macro_invoke(bContext *C, wmOperator *op, wmEvent *event)
                else if(opm->type->exec)
                        retval= opm->type->exec(C, opm);
                
+               /* if modal, pass operator flags to macro, they may be needed later */
+               if(retval & OPERATOR_RUNNING_MODAL)
+                       op->flag = opm->flag;
+
                if(!(retval & OPERATOR_FINISHED))
                        break;
        }