Commit 86a76d62 authored by Michael Natterer's avatar Michael Natterer 😴

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.
parent cb1e3afb
......@@ -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)
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
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