=bmesh= merge from trunk at r36529
[blender.git] / source / blender / windowmanager / intern / wm_operators.c
index 63a8ecc4043df5f55acaa4049eb4ddfb8cc482f0..697fd4954f7d9b3cfbc689c8066358f7e769fe28 100644 (file)
@@ -208,7 +208,7 @@ static int wm_macro_exec(bContext *C, wmOperator *op)
                if(opm->type->exec) {
                        retval= opm->type->exec(C, opm);
                
-                       if (retval & OPERATOR_FINISHED) {
+                       if ((retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) {
                                MacroData *md = op->customdata;
                                md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */
                        } else {
@@ -233,7 +233,7 @@ static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event,
 
                BLI_movelisttolist(&op->reports->list, &opm->reports->list);
                
-               if (retval & OPERATOR_FINISHED) {
+               if ((retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) {
                        MacroData *md = op->customdata;
                        md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */
                } else {
@@ -261,7 +261,7 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event)
                retval = opm->type->modal(C, opm, event);
 
                /* if this one is done but it's not the last operator in the macro */
-               if ((retval & OPERATOR_FINISHED) && opm->next) {
+               if (opm->next && (retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) {
                        MacroData *md = op->customdata;
 
                        md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */
@@ -2255,15 +2255,15 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event)
        int sx, sy;
 
        if(event->type== MOUSEMOVE) {
-               wm_subwindow_getorigin(CTX_wm_window(C), gesture->swinid, &sx, &sy);
+                       wm_subwindow_getorigin(CTX_wm_window(C), gesture->swinid, &sx, &sy);
 
-               rect->xmin= event->x - sx;
-               rect->ymin= event->y - sy;
+                       rect->xmin= event->x - sx;
+                       rect->ymin= event->y - sy;
 
-               wm_gesture_tag_redraw(C);
+                       wm_gesture_tag_redraw(C);
 
-               if(gesture->mode)
-                       gesture_circle_apply(C, op);
+                       if(gesture->mode)
+                               gesture_circle_apply(C, op);
        }
        else if (event->type==EVT_MODAL_MAP) {
                switch (event->val) {