Commit 42b82419 authored by Ell's avatar Ell

app: another fix to drawable direct-fill criterion

Don't use a direct-buffer fill when filling using a pattern with
alpha, even when the mode is subtractive.
parent 660f53d3
......@@ -75,21 +75,24 @@ gimp_drawable_edit_can_fill_direct (GimpDrawable *drawable,
(! gimp_layer_mode_is_subtractive (mode) ^
! (composite_region & GIMP_LAYER_COMPOSITE_REGION_SOURCE)))
{
gboolean source_has_alpha = FALSE;
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_PATTERN &&
! gimp_layer_mode_is_subtractive (mode))
switch (gimp_fill_options_get_style (options))
{
GimpPattern *pattern;
const Babl *format;
case GIMP_FILL_STYLE_SOLID:
return TRUE;
pattern = gimp_context_get_pattern (context);
format = gimp_temp_buf_get_format (gimp_pattern_get_mask (pattern));
case GIMP_FILL_STYLE_PATTERN:
{
GimpPattern *pattern;
GimpTempBuf *mask;
const Babl *format;
source_has_alpha = babl_format_has_alpha (format);
}
pattern = gimp_context_get_pattern (context);
mask = gimp_pattern_get_mask (pattern);
format = gimp_temp_buf_get_format (mask);
return ! source_has_alpha;
return ! babl_format_has_alpha (format);
}
}
}
return FALSE;
......
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