app: same ERASE mode fix for gimp_edit_clear()

This commit is contained in:
Michael Natterer 2012-05-20 17:32:43 +02:00
parent 198a2f0a51
commit 0d636a3561
1 changed files with 8 additions and 2 deletions

View File

@ -372,7 +372,8 @@ gimp_edit_clear (GimpImage *image,
GimpDrawable *drawable,
GimpContext *context)
{
GimpRGB background;
GimpRGB background;
GimpLayerModeEffects paint_mode;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
@ -381,9 +382,14 @@ gimp_edit_clear (GimpImage *image,
gimp_context_get_background (context, &background);
if (gimp_drawable_has_alpha (drawable))
paint_mode = GIMP_ERASE_MODE;
else
paint_mode = GIMP_NORMAL_MODE;
return gimp_edit_fill_full (image, drawable,
&background, NULL,
GIMP_OPACITY_OPAQUE, GIMP_ERASE_MODE,
GIMP_OPACITY_OPAQUE, paint_mode,
C_("undo-type", "Clear"));
}