[gimp] Don't set "lock-alpha" and "lock-content" on items where it can't be changed
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Don't set "lock-alpha" and "lock-content" on items where it can't be changed
- Date: Sun, 30 Aug 2009 19:03:16 +0000 (UTC)
commit 23749cda2c4ec4d3b3097463efda6110512013de
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 30 21:02:43 2009 +0200
Don't set "lock-alpha" and "lock-content" on items where it can't be changed
app/xcf/xcf-load.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index be1179e..0cd1fcf 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -673,7 +673,10 @@ xcf_load_layer_props (XcfInfo *info,
gboolean lock_content;
info->cp += xcf_read_int32 (info->fp, (guint32 *) &lock_content, 1);
- gimp_item_set_lock_content (GIMP_ITEM (*layer), lock_content, FALSE);
+
+ if (gimp_item_can_lock_content (GIMP_ITEM (*layer)))
+ gimp_item_set_lock_content (GIMP_ITEM (*layer),
+ lock_content, FALSE);
}
break;
@@ -682,7 +685,9 @@ xcf_load_layer_props (XcfInfo *info,
gboolean lock_alpha;
info->cp += xcf_read_int32 (info->fp, (guint32 *) &lock_alpha, 1);
- gimp_layer_set_lock_alpha (*layer, lock_alpha, FALSE);
+
+ if (gimp_layer_can_lock_alpha (*layer))
+ gimp_layer_set_lock_alpha (*layer, lock_alpha, FALSE);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]