xcf: use only one bit to save expanded state

This commit is contained in:
Massimo Valentini 2011-10-07 20:05:52 +02:00
parent 89d3869760
commit ca650844c2
3 changed files with 12 additions and 2 deletions

View File

@ -1137,7 +1137,9 @@ xcf_load_layer (XcfInfo *info,
}
else
{
gimp_viewable_set_expanded (GIMP_VIEWABLE (layer), group_layer_flags != 0);
gboolean expanded = group_layer_flags & XCF_GROUP_ITEM_EXPANDED;
gimp_viewable_set_expanded (GIMP_VIEWABLE (layer), expanded);
}
/* read in the layer mask */

View File

@ -75,6 +75,11 @@ typedef enum
XCF_STROKETYPE_BEZIER_STROKE = 1
} XcfStrokeType;
typedef enum
{
XCF_GROUP_ITEM_EXPANDED = 1
} XcfGroupItemFlagsType;
typedef struct _XcfInfo XcfInfo;
struct _XcfInfo

View File

@ -539,7 +539,10 @@ xcf_save_layer_props (XcfInfo *info,
if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))
{
gint32 flags = gimp_viewable_get_expanded (GIMP_VIEWABLE (layer));
gint32 flags = 0;
if (gimp_viewable_get_expanded (GIMP_VIEWABLE (layer)))
flags |= XCF_GROUP_ITEM_EXPANDED;
xcf_check_error (xcf_save_prop (info,
image, PROP_GROUP_ITEM_FLAGS, error,