1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

core: Show preview with NDE filters

Resolves #10762.

Updates gimpdrawable-preview.c to use
gimp_drawable_get_buffer_with_effects (),
which includes any NDE Filters applied to
the layer in the preview.
The preview is also set to update when a
filter is applied non-destructively.
This commit is contained in:
Alx Sa
2024-02-28 11:34:31 +00:00
parent 46a1580018
commit 10b96b1025
2 changed files with 10 additions and 3 deletions

View File

@@ -214,7 +214,7 @@ gimp_drawable_get_sub_preview (GimpDrawable *drawable,
if (! image->gimp->config->layer_previews)
return NULL;
buffer = gimp_drawable_get_buffer (drawable);
buffer = gimp_drawable_get_buffer_with_effects (drawable);
preview = gimp_temp_buf_new (dest_width, dest_height,
gimp_drawable_get_preview_format (drawable));
@@ -271,7 +271,7 @@ gimp_drawable_get_sub_pixbuf (GimpDrawable *drawable,
if (! image->gimp->config->layer_previews)
return NULL;
buffer = gimp_drawable_get_buffer (drawable);
buffer = gimp_drawable_get_buffer_with_effects (drawable);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
dest_width, dest_height);
@@ -433,7 +433,7 @@ gimp_drawable_get_sub_preview_async (GimpDrawable *drawable,
if (! image->gimp->config->layer_previews)
return NULL;
buffer = gimp_drawable_get_buffer (drawable);
buffer = gimp_drawable_get_buffer_with_effects (drawable);
if (no_async_drawable_previews < 0)
{

View File

@@ -807,8 +807,15 @@ gimp_drawable_filter_commit (GimpDrawableFilter *filter,
}
else
{
GeglRectangle rect;
if (gimp_viewable_preview_is_frozen (GIMP_VIEWABLE (filter->drawable)))
gimp_viewable_preview_thaw (GIMP_VIEWABLE (filter->drawable));
/* Update layer tree preview */
rect = gimp_drawable_get_bounding_box (filter->drawable);
gimp_drawable_update (filter->drawable, rect.x, rect.y,
rect.width, rect.height);
}
if (filter)