From f287762678d8c55fc2495e7a0ffe71c3ee3006b1 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sat, 5 Dec 2009 19:05:21 +0000 Subject: [PATCH] Macros in macro didn't work correctly. --- source/blender/windowmanager/intern/wm_event_system.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 93c8b669611..c19d1000573 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -382,10 +382,13 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P if(ot->macro.first) { static wmOperator *motherop= NULL; wmOperatorTypeMacro *otmacro; + int root = 0; /* ensure all ops are in execution order in 1 list */ - if(motherop==NULL) - motherop= op; + if(motherop==NULL) { + motherop = op; + root = 1; + } for(otmacro= ot->macro.first; otmacro; otmacro= otmacro->next) { wmOperatorType *otm= WM_operatortype_find(otmacro->idname, 0); @@ -395,7 +398,8 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P opm->opm= motherop; /* pointer to mom, for modal() */ } - motherop= NULL; + if (root) + motherop= NULL; } return op;