Small fix for my last fix: ignore the `preview' flag; if either size
authorNicholas Bishop <nicholasbishop@gmail.com>
Tue, 18 Jan 2011 04:32:41 +0000 (04:32 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Tue, 18 Jan 2011 04:32:41 +0000 (04:32 +0000)
has been marked for update then do it regardless. Otherwise changing
the texture type doesn't always update the brush texture preview.

source/blender/editors/interface/interface_icons.c

index df4ab336334712f3452b6beaee86fb441979e4d8..bd793538f5030ccd1a9536cf105e33bf694037b4 100644 (file)
@@ -1001,7 +1001,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
        }
 }
 
-void ui_id_icon_render(bContext *C, ID *id, int preview)
+void ui_id_icon_render(bContext *C, ID *id, int UNUSED(preview))
 {
        PreviewImage *pi = BKE_previewimg_get(id); 
        int i;
@@ -1013,8 +1013,7 @@ void ui_id_icon_render(bContext *C, ID *id, int preview)
                /* check if preview rect needs to be created; changed
                   only set by dynamic icons */
                if((pi->changed[i] || !pi->rect[i])) {
-                       if(i == 0 || preview)
-                               icon_set_image(C, id, pi, i);
+                       icon_set_image(C, id, pi, i);
                        pi->changed[i] = 0;
                }
        }