Commit ae0f595a authored by Jehan's avatar Jehan

app: edit-fill-fg|bg|pattern multi-layer aware.

parent 11749532
Pipeline #200663 passed with stages
in 25 minutes and 46 seconds
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment