Skip group layers when transforming the entire image

Group layers update themselves when their children change, so simply
skip them when cropping, flipping, resizing, rotating or scaling the
image.
This commit is contained in:
Michael Natterer 2009-08-25 15:46:53 +02:00
parent cb1e3afba4
commit 86a76d6237
5 changed files with 24 additions and 0 deletions

View File

@ -178,6 +178,10 @@ gimp_image_crop (GimpImage *image,
{
item = (GimpItem *) list->data;
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
gimp_item_translate (item, -x1, -y1, TRUE);
if (crop_layers)

View File

@ -116,6 +116,10 @@ gimp_image_flip (GimpImage *image,
{
GimpItem *item = list->data;
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
gimp_item_flip (item, context, flip_type, axis, FALSE);
if (progress)

View File

@ -154,6 +154,10 @@ gimp_image_resize_with_layers (GimpImage *image,
gint old_offset_x;
gint old_offset_y;
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
gimp_item_get_offset (item, &old_offset_x, &old_offset_y);
gimp_item_translate (item, offset_x, offset_y, TRUE);

View File

@ -176,6 +176,10 @@ gimp_image_rotate (GimpImage *image,
gint off_x;
gint off_y;
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
gimp_item_get_offset (item, &off_x, &off_y);
gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE);

View File

@ -150,6 +150,10 @@ gimp_image_scale (GimpImage *image,
gimp_sub_progress_set_step (GIMP_SUB_PROGRESS (sub_progress),
progress_current++, progress_steps);
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
if (! gimp_item_scale_by_factors (item,
img_scale_w, img_scale_h,
interpolation_type, sub_progress))
@ -327,6 +331,10 @@ gimp_image_scale_check (const GimpImage *image,
{
GimpItem *item = list->data;
/* group layers are updated automatically */
if (gimp_viewable_get_children (GIMP_VIEWABLE (item)))
continue;
if (! gimp_item_check_scaling (item, new_width, new_height))
{
g_list_free (all_layers);