Issue #11251: Edit -> Clear (Undo) does not clear the effects which extend…

… outside the drawable's boundary.
This commit is contained in:
Jehan 2025-03-03 20:49:05 +01:00
parent 5d6e1ec889
commit 4012f93e62
2 changed files with 19 additions and 2 deletions

View file

@ -194,7 +194,19 @@ gimp_drawable_edit_fill (GimpDrawable *drawable,
{
gimp_drawable_edit_fill_direct (drawable, options, undo_desc);
gimp_drawable_update (drawable, x, y, width, height);
if (gimp_drawable_has_visible_filters (drawable))
{
/* For drawables with filters, update the bounding box then
* let the drawable update everything, because the filtered
* render may be bigger than the filled part.
*/
gimp_drawable_update_bounding_box (drawable);
gimp_drawable_update (drawable, 0, 0, -1, -1);
}
else
{
gimp_drawable_update (drawable, x, y, width, height);
}
}
else
{

View file

@ -27,6 +27,7 @@
#include "gimp-memsize.h"
#include "gimpimage.h"
#include "gimpdrawable.h"
#include "gimpdrawable-filters.h"
#include "gimpdrawableundo.h"
@ -186,13 +187,17 @@ gimp_drawable_undo_pop (GimpUndo *undo,
GimpUndoAccumulator *accum)
{
GimpDrawableUndo *drawable_undo = GIMP_DRAWABLE_UNDO (undo);
GimpDrawable *drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);
gimp_drawable_swap_pixels (GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item),
gimp_drawable_swap_pixels (drawable,
drawable_undo->buffer,
drawable_undo->x,
drawable_undo->y);
if (gimp_drawable_has_visible_filters (drawable))
gimp_drawable_update (drawable, 0, 0, -1, -1);
}
static void