diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index a8cee0fcc8..251a7ca274 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -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);