Recreate mipmaps after undo in image editor
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 9 May 2011 13:13:16 +0000 (13:13 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 9 May 2011 13:13:16 +0000 (13:13 +0000)
source/blender/editors/sculpt_paint/paint_image.c

index 29bcb191b46d12ad07f134a8f6da43ab81076be4..cb8071171981e4b585858c7ce6cdb9ee9f51950c 100644 (file)
@@ -440,6 +440,8 @@ static void image_undo_restore(bContext *C, ListBase *lb)
                GPU_free_image(ima); /* force OpenGL reload */
                if(ibuf->rect_float)
                        ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */
+               if(ibuf->mipmap[0])
+                       ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */
 
        }