mirror of https://github.com/GNOME/gimp.git
Issue #3134 - Deleting last layer of group not updating image
In gimp_group_layer_get_size(), make sure to always set *width and *height, even when the group is empty, so that when the function is called through gimp_projectable_get_size() by the group's projection, the correct size is reported. This makes sure we update the correct area when the group becomes empty.
This commit is contained in:
parent
8e77347cac
commit
a712308f20
|
@ -456,6 +456,7 @@ gimp_group_layer_get_size (GimpViewable *viewable,
|
|||
gint *height)
|
||||
{
|
||||
GimpGroupLayerPrivate *private = GET_PRIVATE (viewable);
|
||||
gboolean result;
|
||||
|
||||
if (private->reallocate_width != 0 &&
|
||||
private->reallocate_height != 0)
|
||||
|
@ -466,13 +467,18 @@ gimp_group_layer_get_size (GimpViewable *viewable,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* return the size only if there are children... */
|
||||
if (gimp_item_stack_get_item_iter (GIMP_ITEM_STACK (private->children)))
|
||||
return GIMP_VIEWABLE_CLASS (parent_class)->get_size (viewable,
|
||||
result = GIMP_VIEWABLE_CLASS (parent_class)->get_size (viewable,
|
||||
width, height);
|
||||
|
||||
/* ...otherwise return "no content" */
|
||||
return FALSE;
|
||||
/* if the group is empty, return "no content" through
|
||||
* gimp_viewable_get_size(), but make sure to set *width and *height anyway,
|
||||
* so that the correct size is reported to the projection through
|
||||
* gimp_projectable_get_size(). see issue #3134.
|
||||
*/
|
||||
if (gimp_container_is_empty (private->children))
|
||||
result = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static GimpContainer *
|
||||
|
|
Loading…
Reference in New Issue