Commit 6fb49724 authored by Ell's avatar Ell

plug-ins: in file-psd, read/write layer group expanded state

Use the new gimp-item-{get,set}-expanded() PDB functions to read
and write group-layer expanded state in PSDs.
parent 4db000a5
......@@ -1463,6 +1463,13 @@ add_layers (gint32 image_id,
/* Tattoo */
if (lyr_a[lidx]->id)
gimp_item_set_tattoo (layer_id, lyr_a[lidx]->id);
/* For layer groups, expand or collapse the group */
if (lyr_a[lidx]->group_type != 0)
{
gimp_item_set_expanded (layer_id,
lyr_a[lidx]->group_type == 1);
}
}
/* Insert the layer */
......
......@@ -1082,7 +1082,7 @@ save_layer_and_mask (FILE *fd,
size = 12;
if (PSDImageData.lLayers[i].type == PSD_LAYER_TYPE_GROUP_START)
type = 1;
type = gimp_item_get_expanded (PSDImageData.lLayers[i].id) ? 1 : 2;
else
type = 3;
......
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