mirror of https://github.com/GNOME/gimp.git
app: vectors-fill-last-values now also multi-paths aware.
This commit is contained in:
parent
d96c13de2b
commit
a1fc57b325
|
@ -295,7 +295,7 @@ items_fill_cmd_callback (GimpAction *action,
|
|||
void
|
||||
items_fill_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
GList *items,
|
||||
gpointer data)
|
||||
{
|
||||
GList *drawables;
|
||||
|
@ -316,17 +316,22 @@ items_fill_last_vals_cmd_callback (GimpAction *action,
|
|||
|
||||
config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
if (! gimp_item_fill (item, drawables,
|
||||
config->fill_options, TRUE, NULL, &error))
|
||||
{
|
||||
gimp_message_literal (image->gimp, G_OBJECT (widget),
|
||||
GIMP_MESSAGE_WARNING, error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
"Fill");
|
||||
|
||||
for (GList *iter = items; iter; iter = iter->next)
|
||||
if (! gimp_item_fill (iter->data, drawables,
|
||||
config->fill_options, TRUE, NULL, &error))
|
||||
{
|
||||
gimp_message_literal (image->gimp, G_OBJECT (widget),
|
||||
GIMP_MESSAGE_WARNING, error->message);
|
||||
g_clear_error (&error);
|
||||
break;
|
||||
}
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ void items_fill_cmd_callback (GimpAction *action,
|
|||
gpointer data);
|
||||
void items_fill_last_vals_cmd_callback (GimpAction *action,
|
||||
GimpImage *image,
|
||||
GimpItem *item,
|
||||
GList *items,
|
||||
gpointer data);
|
||||
|
||||
void items_stroke_cmd_callback (GimpAction *action,
|
||||
|
|
|
@ -122,8 +122,8 @@ static const GimpActionEntry vectors_actions[] =
|
|||
GIMP_HELP_PATH_FILL },
|
||||
|
||||
{ "vectors-fill-last-values", GIMP_ICON_TOOL_BUCKET_FILL,
|
||||
NC_("vectors-action", "Fill Path"), NULL,
|
||||
NC_("vectors-action", "Fill the path with last values"),
|
||||
NC_("vectors-action", "Fill Paths"), NULL,
|
||||
NC_("vectors-action", "Fill the paths with last values"),
|
||||
vectors_fill_last_vals_cmd_callback,
|
||||
GIMP_HELP_PATH_FILL },
|
||||
|
||||
|
@ -444,7 +444,7 @@ vectors_actions_update (GimpActionGroup *group,
|
|||
SET_SENSITIVE ("vectors-fill", n_selected_vectors > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
SET_SENSITIVE ("vectors-fill-last-values", n_selected_vectors == 1 &&
|
||||
SET_SENSITIVE ("vectors-fill-last-values", n_selected_vectors > 0 &&
|
||||
dr_writable &&
|
||||
!dr_children);
|
||||
SET_SENSITIVE ("vectors-stroke", n_selected_vectors == 1 &&
|
||||
|
|
|
@ -592,13 +592,11 @@ vectors_fill_last_vals_cmd_callback (GimpAction *action,
|
|||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpVectors *vectors;
|
||||
return_if_no_vectors (image, vectors, data);
|
||||
GimpImage *image;
|
||||
GList *vectors;
|
||||
return_if_no_vectors_list (image, vectors, data);
|
||||
|
||||
items_fill_last_vals_cmd_callback (action,
|
||||
image, GIMP_ITEM (vectors),
|
||||
data);
|
||||
items_fill_last_vals_cmd_callback (action, image, vectors, data);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue