[gimp] Bug 795418 - Gimp 'critical error' when running luminosity masks script
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 795418 - Gimp 'critical error' when running luminosity masks script
- Date: Sat, 21 Apr 2018 08:43:59 +0000 (UTC)
commit 8be37da0128ad319778737cafcb824d976cba66a
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 21 10:38:55 2018 +0200
Bug 795418 - Gimp 'critical error' when running luminosity masks script
In the gimp-channel-combine-masks PDB wrapper, only push an undo step
if the modified channel is attached to an image. It's a completely
reasonable use case to combine unattached channels.
app/pdb/channel-cmds.c | 4 +++-
pdb/groups/channel.pdb | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/pdb/channel-cmds.c b/app/pdb/channel-cmds.c
index a80c6f5..b1db2bd 100644
--- a/app/pdb/channel-cmds.c
+++ b/app/pdb/channel-cmds.c
@@ -195,7 +195,9 @@ channel_combine_masks_invoker (GimpProcedure *procedure,
if (success)
{
- gimp_channel_push_undo (channel1, _("Combine Masks"));
+ if (gimp_item_is_attached (GIMP_ITEM (channel1)))
+ gimp_channel_push_undo (channel1, _("Combine Masks"));
+
gimp_channel_combine_mask (channel1, channel2, operation, offx, offy);
}
diff --git a/pdb/groups/channel.pdb b/pdb/groups/channel.pdb
index 0d0ae94..c7dd504 100644
--- a/pdb/groups/channel.pdb
+++ b/pdb/groups/channel.pdb
@@ -143,7 +143,9 @@ HELP
headers => [ qw("core/gimpchannel-combine.h" "gimp-intl.h") ],
code => <<'CODE'
{
- gimp_channel_push_undo (channel1, _("Combine Masks"));
+ if (gimp_item_is_attached (GIMP_ITEM (channel1)))
+ gimp_channel_push_undo (channel1, _("Combine Masks"));
+
gimp_channel_combine_mask (channel1, channel2, operation, offx, offy);
}
CODE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]