From ef3489560bff85177ab59b64b8aa3de9828db5c6 Mon Sep 17 00:00:00 2001 From: "Garry R. Osgood" Date: Wed, 5 Jan 2000 19:14:08 +0000 Subject: [PATCH] *app/undo.c: GimpChannel->bounds_known field on the image Selection Mask 2000-01-05 Garry R. Osgood *app/undo.c: GimpChannel->bounds_known field on the image Selection Mask channel was never invalidated when restored via undo_pop_channel_mod(). Caused PixelRegion iterators calculating new selection boundaries to use cached image dimensions, thereby trying to access tiles non-existent in the scaled-down image. Closes #4840. --- ChangeLog | 10 ++++++++++ app/core/gimpimage-undo-push.c | 2 ++ app/undo.c | 2 ++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index d523b5ceb8..d880be4318 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-01-05 Garry R. Osgood + *app/undo.c: GimpChannel->bounds_known field on the + image Selection Mask channel was never invalidated when restored + via undo_pop_channel_mod(). Caused PixelRegion iterators calculating + new selection boundaries to use cached image dimensions, thereby + trying to access tiles non-existent in the scaled-down image. + Closes #4840; see the resolution report for that bug for more + information. See #4980, which created selection mask artifacts + leading up to the incurring of this bug. + 2000-01-05 Michael Natterer * app/gimphelp.[ch]: removed most functions. Show the help page in diff --git a/app/core/gimpimage-undo-push.c b/app/core/gimpimage-undo-push.c index 6a269bd85b..aada8b3f00 100644 --- a/app/core/gimpimage-undo-push.c +++ b/app/core/gimpimage-undo-push.c @@ -1868,6 +1868,8 @@ undo_pop_channel_mod (GImage *gimage, GIMP_DRAWABLE(channel)->tiles = tiles; GIMP_DRAWABLE(channel)->width = tiles->width; GIMP_DRAWABLE(channel)->height = tiles->height; + GIMP_CHANNEL(channel)->bounds_known = FALSE; /* #4840. set to False because bounds + reflect previous tile set */ /* Set the new buffer */ data[1] = temp; diff --git a/app/undo.c b/app/undo.c index 6a269bd85b..aada8b3f00 100644 --- a/app/undo.c +++ b/app/undo.c @@ -1868,6 +1868,8 @@ undo_pop_channel_mod (GImage *gimage, GIMP_DRAWABLE(channel)->tiles = tiles; GIMP_DRAWABLE(channel)->width = tiles->width; GIMP_DRAWABLE(channel)->height = tiles->height; + GIMP_CHANNEL(channel)->bounds_known = FALSE; /* #4840. set to False because bounds + reflect previous tile set */ /* Set the new buffer */ data[1] = temp;