mirror of https://github.com/GNOME/gimp.git
gimp_group_layer_update_size(): remove bogus optimization
The optimization here which would change only the group layer's offset if the extents of the union of its children has not changed is completely bogus. That case can only happen if one of the chldren was moved in a way that does not change the extents of all children's union, but this doesn't mean that the childrens' positions relative to each other have not changed. Instead, invalidate the entire projection to at least avoid constant reallocation of the tile pyramid. Found by group layer testing hero Tobias Jakobs. (will have to optimize real translations of the entire group (or of the only child in the group) differently)
This commit is contained in:
parent
1735f86d25
commit
228da1d32e
|
@ -869,6 +869,14 @@ gimp_group_layer_update_size (GimpGroupLayer *group)
|
|||
else
|
||||
{
|
||||
gimp_item_set_offset (item, x, y);
|
||||
|
||||
/* invalidate the entire projection since the poition of
|
||||
* the children relative to each other might have changed
|
||||
* in a way that happens to leave the group's width and
|
||||
* height the same
|
||||
*/
|
||||
gimp_projectable_invalidate (GIMP_PROJECTABLE (group),
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
if (group->offset_node)
|
||||
|
|
Loading…
Reference in New Issue