rendered paste bodyIndex: source/blender/src/interface_icons.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/interface_icons.c,v
retrieving revision 1.14
diff -u -r1.14 interface_icons.c
--- source/blender/src/interface_icons.c 29 Jun 2006 09:44:08 -0000 1.14
+++ source/blender/src/interface_icons.c 1 Jul 2006 18:16:04 -0000
@@ -728,11 +728,11 @@
/* only called when icon has changed */
/* only call with valid pointer from BIF_icon_draw */
-static void icon_set_image(ID *id, DrawInfo *di)
+static int icon_set_image(ID *id, DrawInfo *di)
{
RenderInfo ri;
- if (!di) return;
+ if (!di) return 0;
if (!di->rect)
di->rect = MEM_callocN(di->rw*di->rh*sizeof(unsigned int), "laprevrect");
@@ -748,6 +748,9 @@
if (GS(id->name) == ID_IM)
icon_from_image((struct Image*)id, &ri);
else {
+ if (qtest())
+ return 0;
+
BIF_previewrender(id, &ri, NULL, PR_ICON_RENDER);
/* world is rendered with alpha=0, so it wasn't displayed
this could be render option for sky to, for later */
@@ -770,6 +773,8 @@
MEM_freeN(ri.rect);
ri.rect = 0;
}
+
+ return 1;
}
void BIF_icon_draw_aspect(float x, float y, int icon_id, float aspect)
@@ -808,8 +813,8 @@
if (icon->changed) /* changed only ever set by dynamic icons */
{
waitcursor(1);
- icon_set_image((ID*)icon->obj, icon->drawinfo);
- icon->changed = 0;
+ if (icon_set_image((ID*)icon->obj, icon->drawinfo))
+ icon->changed = 0;
waitcursor(0);
}