Bug 730550 - Layers incorrectly positioned on screen

gimp_group_layer_update_size(): update the group layer's offset node
before reallocating the group's projection, or we might render the
group projection's buffer with the old offsets.
This commit is contained in:
Michael Natterer 2014-05-22 20:46:13 +02:00
parent f0ebc09422
commit 7647b0d3a0
1 changed files with 9 additions and 6 deletions

View File

@ -1155,6 +1155,15 @@ gimp_group_layer_update_size (GimpGroupLayer *group)
width != old_width ||
height != old_height)
{
/* set the offset first, so the graph is in the right state when
* the projection is reallocated, see bug #730550.
*/
if (private->offset_node)
gegl_node_set (private->offset_node,
"x", (gdouble) -x,
"y", (gdouble) -y,
NULL);
if (private->reallocate_projection ||
width != old_width ||
height != old_height)
@ -1195,12 +1204,6 @@ gimp_group_layer_update_size (GimpGroupLayer *group)
gimp_projectable_invalidate (GIMP_PROJECTABLE (group),
x, y, width, height);
}
if (private->offset_node)
gegl_node_set (private->offset_node,
"x", (gdouble) -x,
"y", (gdouble) -y,
NULL);
}
}