mirror of https://github.com/GNOME/gimp.git
Don't allow dropping colors and patterns and don't allow pasting to groups
This commit is contained in:
parent
13b384e332
commit
35e67dae43
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue