app: flush image when committing free-select tool

In GimpFreeSelectTool, flush the image when committing the tool, if
the seletion is created at the time of the commit (i.e., if the
polygon is not closed prior to the commit).
This commit is contained in:
Ell
2019-04-26 03:35:20 -04:00
parent 2ee1ceb21f
commit 71c624c5ab

View File

@ -80,7 +80,7 @@ static void gimp_free_select_tool_commit (GimpFreeSelectTool *free
GimpDisplay *display);
static void gimp_free_select_tool_halt (GimpFreeSelectTool *free_sel);
static void gimp_free_select_tool_select (GimpFreeSelectTool *free_sel,
static gboolean gimp_free_select_tool_select (GimpFreeSelectTool *free_sel,
GimpDisplay *display);
@ -275,10 +275,13 @@ gimp_free_select_tool_commit (GimpFreeSelectTool *free_sel,
GimpPolygonSelectTool *poly_sel = GIMP_POLYGON_SELECT_TOOL (free_sel);
if (! gimp_polygon_select_tool_is_closed (poly_sel))
gimp_free_select_tool_select (free_sel, display);
{
if (gimp_free_select_tool_select (free_sel, display))
gimp_image_flush (gimp_display_get_image (display));
}
}
static void
static gboolean
gimp_free_select_tool_select (GimpFreeSelectTool *free_sel,
GimpDisplay *display)
{
@ -309,5 +312,9 @@ gimp_free_select_tool_select (GimpFreeSelectTool *free_sel,
TRUE);
gimp_tool_control_pop_preserve (tool->control);
return TRUE;
}
return FALSE;
}