mirror of https://github.com/GNOME/gimp.git
app: same ERASE mode fix for gimp_edit_clear()
This commit is contained in:
parent
198a2f0a51
commit
0d636a3561
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue