[gimp] app: don't show result-size warning when transforming a selection
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't show result-size warning when transforming a selection
- Date: Tue, 21 May 2019 12:19:52 +0000 (UTC)
commit 1c91578bb29b6fadd7973a97e5e38218cfd111d4
Author: Ell <ell_se yahoo com>
Date: Tue May 21 08:12:04 2019 -0400
app: don't show result-size warning when transforming a selection
In gimp_drawable_transform_get_effective_clip(), always return
RESIZE_CLIP when the input drawable is the image mask, since the
presence of a selection doesn't matter in this case. This avoids
erroneously displaying a result-size warning when transforming the
selection using any of the selection tools.
app/core/gimpdrawable-transform.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpdrawable-transform.c b/app/core/gimpdrawable-transform.c
index a18d95cafc..b5c1743a2e 100644
--- a/app/core/gimpdrawable-transform.c
+++ b/app/core/gimpdrawable-transform.c
@@ -85,10 +85,14 @@ gimp_drawable_transform_get_effective_clip (GimpDrawable *drawable,
}
else
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
+ GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
+ GimpChannel *mask = gimp_image_get_mask (image);
- if (gimp_channel_is_empty (gimp_image_get_mask (image)))
- clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
+ if (GIMP_CHANNEL (drawable) == mask ||
+ gimp_channel_is_empty (mask))
+ {
+ clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]