X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fobjects%2Fgrits-tile.c;fp=src%2Fobjects%2Fgrits-tile.c;h=7d656e5b436c36b9946e1617b287aaef1c475c38;hp=e42a1606338d916f0704ff1959e4aece9db7edbe;hb=6793e7a7f7752e8924c40c0e0c99e857350d7356;hpb=5c17e7d79895982036139dcffb5c17cefb1d4d9f diff --git a/src/objects/grits-tile.c b/src/objects/grits-tile.c index e42a160..7d656e5 100644 --- a/src/objects/grits-tile.c +++ b/src/objects/grits-tile.c @@ -246,6 +246,13 @@ void grits_tile_update(GritsTile *tile, GritsPoint *eye, load_func, user_data); } +static void _grits_tile_queue_draw(GritsTile *tile) +{ + while (!GRITS_OBJECT(tile)->viewer && tile->parent) + tile = tile->parent; + grits_object_queue_draw(GRITS_OBJECT(tile)); +} + /** * grits_tile_load_pixels: * @tile: the tile to load data into @@ -276,7 +283,8 @@ gboolean grits_tile_load_pixels(GritsTile *tile, guchar *pixels, tile->pixels = pixels; /* Queue OpenGL texture load/draw */ - grits_object_queue_draw(GRITS_OBJECT(tile)); + _grits_tile_queue_draw(tile); + return TRUE; } @@ -301,7 +309,7 @@ gboolean grits_tile_load_pixbuf(GritsTile *tile, GdkPixbuf *pixbuf) tile->alpha = gdk_pixbuf_get_has_alpha(pixbuf); /* Queue OpenGL texture load/draw */ - grits_object_queue_draw(GRITS_OBJECT(tile)); + _grits_tile_queue_draw(tile); return TRUE; } @@ -329,7 +337,7 @@ gboolean grits_tile_load_file(GritsTile *tile, const gchar *file) tile->alpha = gdk_pixbuf_get_has_alpha(tile->pixbuf); /* Queue OpenGL texture load/draw */ - grits_object_queue_draw(GRITS_OBJECT(tile)); + _grits_tile_queue_draw(tile); return TRUE; }