Bugfix #27573
authorTon Roosendaal <ton@blender.org>
Tue, 14 Jun 2011 09:55:38 +0000 (09:55 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 14 Jun 2011 09:55:38 +0000 (09:55 +0000)
Sculpt and Paint undo steps kept hanging in the sculpt/paint modes.
Now undo will switch back to global undo, and redo enter the mode
again. Just like weight/vertex paint.

source/blender/editors/util/undo.c

index 24a8688..8a6ec7f 100644 (file)
@@ -156,11 +156,11 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
                int do_glob_undo= 0;
                
                if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
-                       if(!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname)
+                       if(!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname))
                                do_glob_undo= 1;
                }
                else if(obact && obact->mode & OB_MODE_SCULPT) {
-                       if(!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname) && undoname)
+                       if(!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname))
                                do_glob_undo= 1;
                }
                else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) {