diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2011-01-18 07:08:01 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2011-01-18 07:08:01 +0300 |
commit | c2a638a81e93f3183b3fdec2652aff1d2bde9ac9 (patch) | |
tree | 0c8a3262a73f0386802f758e89820d764ab02fc0 /source/blender/editors/interface | |
parent | 2431e8e045f9fee8454ecd97f287d0e171b1ee94 (diff) |
More fixes for bug [#25649], Image editor paint icon missing until
enter weight paint, hopefully fully fixed this time
* The texture selector for brushes wasn't updating. Seems that preview
images have two sizes, small (icon) and big, but it was only
updating if the icon size was set to update. Now both are checked.
* Also changed the previewimage arrays to use the already-existing
PREVIEW_MIPMAPS define, makes it a little clearer what the arrays
are for.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index bb6738cb8cd..df4ab336334 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1004,17 +1004,18 @@ 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) { PreviewImage *pi = BKE_previewimg_get(id); + int i; - if (pi) { - if ((pi->changed[0] ||!pi->rect[0])) /* changed only ever set by dynamic icons */ - { - /* create the preview rect if necessary */ - - icon_set_image(C, id, pi, 0); /* icon size */ - if (preview) - icon_set_image(C, id, pi, 1); /* preview size */ - - pi->changed[0] = 0; + if(!pi) + return; + + for(i = 0; i < PREVIEW_MIPMAPS; i++) { + /* 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); + pi->changed[i] = 0; } } } |