app: in gimp_filter_tool_get_drawable_area(), don't return empty area

In gimp_filter_tool_get_drawable_area(), when the image mask
doesn't intersect the drawable, return a minimal area, instead of
an empty/invalid area.
This commit is contained in:
Ell 2019-06-06 02:56:23 -04:00
parent 30429e30e2
commit 428ee0e2ad
1 changed files with 11 additions and 5 deletions

View File

@ -1801,11 +1801,17 @@ gimp_filter_tool_get_drawable_area (GimpFilterTool *filter_tool,
switch (options->region)
{
case GIMP_FILTER_REGION_SELECTION:
gimp_item_mask_intersect (GIMP_ITEM (drawable),
if (! gimp_item_mask_intersect (GIMP_ITEM (drawable),
&drawable_area->x,
&drawable_area->y,
&drawable_area->width,
&drawable_area->height);
&drawable_area->height))
{
drawable_area->x = 0;
drawable_area->y = 0;
drawable_area->width = 1;
drawable_area->height = 1;
}
break;
case GIMP_FILTER_REGION_DRAWABLE: