Revision: 28342
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28342
Author:   broken
Date:     2010-04-22 13:35:11 +0200 (Thu, 22 Apr 2010)

Log Message:
-----------
Fix [#22088] Object's material changes (links) to other when moving an object 
to an other layer

WM_operator_props_popup() and subsequent block handle function redo_cb()
was popping an operator undo, without having pushed one previously - 
this would undo one too many times when using the properties invoke popup.

Fixed by adding an undo push to WM_operator_props_popup()

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c    
2010-04-22 10:56:45 UTC (rev 28341)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c    
2010-04-22 11:35:11 UTC (rev 28342)
@@ -1016,8 +1016,12 @@
 {
        int retval= OPERATOR_CANCELLED;
        
-       if(op->type->exec)
+       if(op->type->exec) {
                retval= op->type->exec(C, op);
+               
+               if(op->type->flag & OPTYPE_UNDO)
+                       ED_undo_push_op(C, op);
+       }
 
        if(retval != OPERATOR_CANCELLED)
                uiPupBlock(C, wm_block_create_redo, op);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to