mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
4db000a522
commit
6fb497247d
|
@ -1463,6 +1463,13 @@ add_layers (gint32 image_id,
|
||||||
/* Tattoo */
|
/* Tattoo */
|
||||||
if (lyr_a[lidx]->id)
|
if (lyr_a[lidx]->id)
|
||||||
gimp_item_set_tattoo (layer_id, 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 */
|
/* Insert the layer */
|
||||||
|
|
|
@ -1082,7 +1082,7 @@ save_layer_and_mask (FILE *fd,
|
||||||
size = 12;
|
size = 12;
|
||||||
|
|
||||||
if (PSDImageData.lLayers[i].type == PSD_LAYER_TYPE_GROUP_START)
|
if (PSDImageData.lLayers[i].type == PSD_LAYER_TYPE_GROUP_START)
|
||||||
type = 1;
|
type = gimp_item_get_expanded (PSDImageData.lLayers[i].id) ? 1 : 2;
|
||||||
else
|
else
|
||||||
type = 3;
|
type = 3;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue