diff --git a/app/core/gimpdrawable-edit.c b/app/core/gimpdrawable-edit.c index 217a0cadc2..19ef45633f 100644 --- a/app/core/gimpdrawable-edit.c +++ b/app/core/gimpdrawable-edit.c @@ -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 { diff --git a/app/core/gimpdrawableundo.c b/app/core/gimpdrawableundo.c index 78b8f3902a..f660ce2bbd 100644 --- a/app/core/gimpdrawableundo.c +++ b/app/core/gimpdrawableundo.c @@ -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