[gimp/gimp-2-8] Bug 735904 - Zealous crop of an image with a selection duplicates image data
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 735904 - Zealous crop of an image with a selection duplicates image data
- Date: Tue, 9 Sep 2014 22:11:58 +0000 (UTC)
commit d217a0bb2a107cfa9cddc3d6c8dc3902b761ccea
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 10 00:09:28 2014 +0200
Bug 735904 - Zealous crop of an image with a selection duplicates image data
Clear the selection before calling gimp_drawable_merge_shadow(), because
the selection affects the merge, which is unwanted here.
(cherry picked from commit aa0912fcd68239455144cd1455cb883cb78f936f)
plug-ins/common/crop-zealous.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/crop-zealous.c b/plug-ins/common/crop-zealous.c
index e996deb..d9c2da4 100644
--- a/plug-ins/common/crop-zealous.c
+++ b/plug-ins/common/crop-zealous.c
@@ -180,6 +180,7 @@ do_zcrop (GimpDrawable *drawable,
gint8 *killcols;
gint32 livingrows, livingcols, destrow, destcol;
gint total_area, area;
+ gint32 selection_copy;
gboolean has_alpha;
width = drawable->width;
@@ -294,13 +295,21 @@ do_zcrop (GimpDrawable *drawable,
g_free (killrows);
g_free (killcols);
- gimp_progress_update (1.00);
+ gimp_drawable_flush (drawable);
gimp_image_undo_group_start (image_id);
- gimp_drawable_flush (drawable);
+ selection_copy = gimp_selection_save (image_id);
+ gimp_selection_none (image_id);
+
gimp_drawable_merge_shadow (drawable->drawable_id, TRUE);
+
+ gimp_image_select_item (image_id, GIMP_CHANNEL_OP_REPLACE, selection_copy);
+ gimp_image_remove_channel (image_id, selection_copy);
+
gimp_image_crop (image_id, livingcols, livingrows, 0, 0);
gimp_image_undo_group_end (image_id);
+
+ gimp_progress_update (1.00);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]