[gimp] app: edit-fill-fg|bg|pattern multi-layer aware.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: edit-fill-fg|bg|pattern multi-layer aware.
- Date: Fri, 31 Jul 2020 15:59:47 +0000 (UTC)
commit ae0f595a199c3c25c74aab3adfe4f987ac63f765
Author: Jehan <jehan girinstud io>
Date: Fri Jul 31 17:52:53 2020 +0200
app: edit-fill-fg|bg|pattern multi-layer aware.
app/actions/edit-actions.c | 6 +++---
app/actions/edit-commands.c | 13 ++++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/app/actions/edit-actions.c b/app/actions/edit-actions.c
index 77c3c50086..da50ef1210 100644
--- a/app/actions/edit-actions.c
+++ b/app/actions/edit-actions.c
@@ -390,9 +390,9 @@ edit_actions_update (GimpActionGroup *group,
/* "edit-named-paste" is always active */
SET_SENSITIVE ("edit-clear", have_writable && have_no_groups);
- SET_SENSITIVE ("edit-fill-fg", writable && !children);
- SET_SENSITIVE ("edit-fill-bg", writable && !children);
- SET_SENSITIVE ("edit-fill-pattern", writable && !children);
+ SET_SENSITIVE ("edit-fill-fg", have_writable && have_no_groups);
+ SET_SENSITIVE ("edit-fill-bg", have_writable && have_no_groups);
+ SET_SENSITIVE ("edit-fill-pattern", have_writable && have_no_groups);
#undef SET_LABEL
#undef SET_SENSITIVE
diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c
index 05d515e3fe..833ff79bf8 100644
--- a/app/actions/edit-commands.c
+++ b/app/actions/edit-commands.c
@@ -512,11 +512,12 @@ edit_fill_cmd_callback (GimpAction *action,
gpointer data)
{
GimpImage *image;
- GimpDrawable *drawable;
+ GList *drawables;
+ GList *iter;
GimpFillType fill_type;
GimpFillOptions *options;
GError *error = NULL;
- return_if_no_drawable (image, drawable, data);
+ return_if_no_drawables (image, drawables, data);
fill_type = (GimpFillType) g_variant_get_int32 (value);
@@ -526,7 +527,13 @@ edit_fill_cmd_callback (GimpAction *action,
action_data_get_context (data),
fill_type, &error))
{
- gimp_drawable_edit_fill (drawable, options, NULL);
+ gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT,
+ gimp_fill_options_get_undo_desc (options));
+
+ for (iter = drawables; iter; iter = iter->next)
+ gimp_drawable_edit_fill (iter->data, options, NULL);
+
+ gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]