mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Merge branch 'alxsa-non-gui-nde-filters' into 'master'
Draft: Issue #10786: Apply filters without GUIs as NDE contextually Closes #10786 See merge request GNOME/gimp!2348
This commit is contained in:
commit
d919928a24
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,7 @@ gimp_drawable_apply_operation_with_config (GimpDrawable *drawable,
|
|||
{
|
||||
GimpDrawableFilter *filter;
|
||||
GimpContainer *filter_stack;
|
||||
gboolean is_non_destructive = FALSE;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
|
@ -93,14 +94,16 @@ gimp_drawable_apply_operation_with_config (GimpDrawable *drawable,
|
|||
|
||||
gimp_drawable_filter_apply (filter, NULL);
|
||||
|
||||
is_non_destructive = gimp_drawable_has_visible_filters (drawable);
|
||||
|
||||
/* For destructive filters, we want them to apply directly on the
|
||||
* drawable rather than merge down onto existing NDE filters */
|
||||
filter_stack = gimp_drawable_get_filters (drawable);
|
||||
if (filter_stack)
|
||||
if (filter_stack && ! is_non_destructive)
|
||||
gimp_container_reorder (filter_stack, GIMP_OBJECT (filter),
|
||||
gimp_container_get_n_children (filter_stack) - 1);
|
||||
|
||||
gimp_drawable_filter_commit (filter, FALSE, progress, TRUE);
|
||||
gimp_drawable_filter_commit (filter, is_non_destructive, progress, TRUE);
|
||||
|
||||
g_object_unref (filter);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue