Commit b4120e3f authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

Bug 767650 - Uncommitted scissors selection is discarded on tool change

gimp_iscissors_tool_commit(): if the curve is not closed, close and
recalculate it.
parent bc667997
......@@ -525,7 +525,6 @@ gimp_iscissors_tool_button_press (GimpTool *tool,
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
static void
iscissors_convert (GimpIscissorsTool *iscissors,
GimpDisplay *display)
......@@ -1255,6 +1254,27 @@ gimp_iscissors_tool_commit (GimpIscissorsTool *iscissors,
GimpSelectionOptions *options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
GimpImage *image = gimp_display_get_image (display);
if (! iscissors->curve->closed)
ISegment *first = g_queue_peek_head (iscissors->curve->segments);
ISegment *last = g_queue_peek_tail (iscissors->curve->segments);
if (first && last)
ISegment *segment;
segment = icurve_append_segment (iscissors->curve,
icurve_close (iscissors->curve);
calculate_segment (iscissors, segment);
iscissors_convert (iscissors, display);
if (iscissors->curve->closed && iscissors->mask)
gimp_channel_select_channel (gimp_image_get_mask (image),
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