Commit 35e67dae authored by Michael Natterer's avatar Michael Natterer 😴

Don't allow dropping colors and patterns and don't allow pasting to groups

parent 13b384e3
......@@ -367,6 +367,14 @@ gimp_display_shell_dnd_bucket_fill (GimpDisplayShell *shell,
if (! drawable)
return;
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("Cannot modify the pixels of group layers."));
return;
}
if (gimp_item_get_lock_content (GIMP_ITEM (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
......@@ -452,12 +460,23 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
drawable = gimp_image_get_active_drawable (image);
if (drawable && gimp_item_get_lock_content (GIMP_ITEM (drawable)))
if (drawable)
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("The active layer's pixels are locked."));
return;
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("Cannot modify the pixels of group layers."));
return;
}
if (gimp_item_get_lock_content (GIMP_ITEM (drawable)))
{
gimp_message_literal (shell->display->gimp, G_OBJECT (shell->display),
GIMP_MESSAGE_ERROR,
_("The active layer's pixels are locked."));
return;
}
}
buffer = GIMP_BUFFER (viewable);
......
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