[gimp] app: always return the rectangle values from gimp_pickable_auto_shrink()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: always return the rectangle values from gimp_pickable_auto_shrink()
- Date: Fri, 3 Jul 2015 15:52:57 +0000 (UTC)
commit fc0d25374411974e45e60751fc6cd32eb8e4b38c
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 3 17:51:06 2015 +0200
app: always return the rectangle values from gimp_pickable_auto_shrink()
If there is nothing to shrink, return the passed rectangle clamped
to the pickable's extents.
app/core/gimppickable-auto-shrink.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimppickable-auto-shrink.c b/app/core/gimppickable-auto-shrink.c
index ac7d39c..fb7e416 100644
--- a/app/core/gimppickable-auto-shrink.c
+++ b/app/core/gimppickable-auto-shrink.c
@@ -103,6 +103,12 @@ gimp_pickable_auto_shrink (GimpPickable *pickable,
x2 = MIN (start_x2, gegl_buffer_get_width (buffer));
y2 = MIN (start_y2, gegl_buffer_get_height (buffer));
+ /* By default, return the start values */
+ *shrunk_x1 = x1;
+ *shrunk_y1 = y1;
+ *shrunk_x2 = x2;
+ *shrunk_y2 = y2;
+
format = babl_format ("R'G'B'A u8");
switch (gimp_pickable_guess_bgcolor (pickable, bgcolor,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]