Commit 892fbafd authored by Jehan's avatar Jehan

app: some more gimp_image_get_active_drawable() removed.

No logics changed. These are places where we expect single layer
selected.
parent 248d2e95
Pipeline #200905 passed with stages
in 22 minutes and 9 seconds
......@@ -88,11 +88,15 @@ buffers_paste_cmd_callback (GimpAction *action,
if (image)
{
gimp_edit_paste (image, gimp_image_get_active_drawable (image),
GList *drawables = gimp_image_get_selected_drawables (image);
gimp_edit_paste (image,
g_list_length (drawables) == 1 ? drawables->data : NULL,
GIMP_OBJECT (buffer), paste_type,
x, y, width, height);
gimp_image_flush (image);
g_list_free (drawables);
}
}
}
......
......@@ -69,7 +69,13 @@ floating_sel_attach (GimpLayer *layer,
* to the drawable
*/
if (drawable == (GimpDrawable *) floating_sel)
drawable = gimp_image_get_active_drawable (image);
{
GList *drawables = gimp_image_get_selected_drawables (image);
g_return_if_fail (g_list_length (drawables) == 1);
drawable = drawables->data;
g_list_free (drawables);
}
}
gimp_layer_set_lock_alpha (layer, TRUE, FALSE);
......
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