Commit 67e68575 authored by Ell's avatar Ell
Browse files

plug-ins: in file-psd, insert layers to image after writing buffers

When loading PSDs, insert layers to the image as the last step of
layer creation, after writing the pixel data to their buffers, so
that the data of child layers is available when their parent
group's projection is subseqeuently invalidated; otherwise, we'd
need an additional gimp_drawable_update() call after writing the
data to the buffers.
parent 93ed1048
......@@ -1473,13 +1473,6 @@ add_layers (gint32 image_id,
}
}
/* Insert the layer */
if (lyr_a[lidx]->group_type == 0 || /* normal layer */
lyr_a[lidx]->group_type == 3 /* group layer end marker */)
{
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
}
/* Remember the active layer ID */
if (lidx == img_a->layer_state)
{
......@@ -1626,6 +1619,13 @@ add_layers (gint32 image_id,
g_free (pixels);
}
}
/* Insert the layer */
if (lyr_a[lidx]->group_type == 0 || /* normal layer */
lyr_a[lidx]->group_type == 3 /* group layer end marker */)
{
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
}
}
for (cidx = 0; cidx < lyr_a[lidx]->num_channels; ++cidx)
......
Supports Markdown
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