svn merge -r37335:37500 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / screen / screen_ops.c
index bd1c00e6fdb376736b40ca95ec07d32e72ceb130..3268f6293a7a4020cc6a28f818a0a37477cc6bb5 100644 (file)
@@ -2459,13 +2459,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
 
 static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
 {
-       wmWindowManager *wm= CTX_wm_manager(C);
-       wmOperator *lastop;
-       
-       /* only for operators that are registered and did an undo push */
-       for(lastop= wm->operators.last; lastop; lastop= lastop->prev)
-               if((lastop->type->flag & OPTYPE_REGISTER) && (lastop->type->flag & OPTYPE_UNDO))
-                       break;
+       wmOperator *lastop= WM_operator_last_redo(C);
        
        if(lastop)
                WM_operator_redo_popup(C, lastop);