Commit da9ddd33 authored by Martin Nordholts's avatar Martin Nordholts

Add and use gimp_drawable_update_tile_source_node()

Collect logic to update the tile_source_node in a new helper function
gimp_drawable_update_tile_source_node().

svn path=/trunk/; revision=27976
parent 2716d25d
2009-02-01 Martin Nordholts <martinn@svn.gnome.org>
* app/core/gimpdrawable.c: Collect logic to update the
tile_source_node in a new helper function
gimp_drawable_update_tile_source_node().
2009-02-01 Martin Nordholts <martinn@svn.gnome.org>
Applied patch from Alexia Death that prepares brushes for
......
......@@ -717,6 +717,20 @@ gimp_drawable_real_get_tiles (GimpDrawable *drawable)
return drawable->tiles;
}
static void
gimp_drawable_update_tile_source_node (GimpDrawable *drawable)
{
if (! drawable->tile_source_node)
return;
if (drawable->tiles)
{
gegl_node_set (drawable->tile_source_node,
"tile-manager", drawable->tiles,
NULL);
}
}
static void
gimp_drawable_real_set_tiles (GimpDrawable *drawable,
gboolean push_undo,
......@@ -766,10 +780,7 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
if (old_has_alpha != gimp_drawable_has_alpha (drawable))
gimp_drawable_alpha_changed (drawable);
if (drawable->tile_source_node)
gegl_node_set (drawable->tile_source_node,
"tile-manager", drawable->tiles,
NULL);
gimp_drawable_update_tile_source_node (drawable);
}
static GeglNode *
......@@ -1068,10 +1079,7 @@ gimp_drawable_configure (GimpDrawable *drawable,
drawable->preview_cache = NULL;
drawable->preview_valid = FALSE;
if (drawable->tile_source_node)
gegl_node_set (drawable->tile_source_node,
"tile-manager", drawable->tiles,
NULL);
gimp_drawable_update_tile_source_node (drawable);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment