[gimp] app: small fix to GimpChunkIterator
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: small fix to GimpChunkIterator
- Date: Sat, 30 Mar 2019 20:37:00 +0000 (UTC)
commit d182c41f8f19da2f9f13176c4adbe33d65ff2113
Author: Ell <ell_se yahoo com>
Date: Sat Mar 30 16:36:16 2019 -0400
app: small fix to GimpChunkIterator
app/core/gimpchunkiterator.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpchunkiterator.c b/app/core/gimpchunkiterator.c
index baa60faf13..0dfdae4652 100644
--- a/app/core/gimpchunkiterator.c
+++ b/app/core/gimpchunkiterator.c
@@ -318,7 +318,9 @@ gimp_chunk_iterator_calc_rect (GimpChunkIterator *iter,
iter->tile_rect.height -
offset_y;
- rect->height = MAX (rect->height, iter->tile_rect.height);
+ if (rect->height <= 0)
+ rect->height += iter->tile_rect.height;
+
rect->height = MIN (rect->height,
iter->current_rect.y + iter->current_rect.height -
rect->y);
@@ -335,7 +337,9 @@ gimp_chunk_iterator_calc_rect (GimpChunkIterator *iter,
iter->tile_rect.width -
offset_x;
- rect->width = MAX (rect->width, iter->tile_rect.width);
+ if (rect->width <= 0)
+ rect->width += iter->tile_rect.width;
+
rect->width = MIN (rect->width,
iter->current_rect.x + iter->current_rect.width -
rect->x);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]