diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-07-14 23:01:40 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-07-14 23:01:40 +0400 |
commit | f588c49cb55b5787085e2b5a65991efd31ce2dee (patch) | |
tree | f4ad4fd5b7a9b0c21c0c65fa357e68a3d8f97f31 /source/blender/editors/interface/interface_icons.c | |
parent | 8d131d519bf448bcccddb833c263bc36af22d6b5 (diff) | |
parent | d4b04fac044b2fe0b6295f271a78c73d57ef0533 (diff) |
Merged changes in the trunk up to revision 30335.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 499fe3b9767..232b6f7f317 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -46,6 +46,7 @@ #include "DNA_screen_types.h" #include "DNA_userdef_types.h" +#include "DNA_brush_types.h" #include "BKE_context.h" #include "BKE_global.h" @@ -762,6 +763,7 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel) prv_img->w[miplevel] = size; prv_img->h[miplevel] = size; prv_img->changed[miplevel] = 1; + prv_img->changed_timestamp[miplevel] = 0; prv_img->rect[miplevel] = MEM_callocN(size*size*sizeof(unsigned int), "prv_rect"); } } @@ -976,6 +978,16 @@ int ui_id_icon_get(bContext *C, ID *id, int preview) /* checks if not exists, or changed */ ui_id_icon_render(C, id, preview); break; + case ID_BR: + { /* use the image in the brush as the icon */ + /* XXX redundancy here can be reduced be rewriting this switch as an if */ + ID* ima_id = (ID*)((Brush*)id)->image_icon; + id = ima_id ? ima_id : id; + iconid= BKE_icon_getid(id); + /* checks if not exists, or changed */ + ui_id_icon_render(C, id, preview); + } + break; default: break; } |