mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
8a2a9775b9
commit
aa0912fcd6
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue