Commit 5700c67b authored by Martin Nordholts's avatar Martin Nordholts Committed by Martin Nordholts
Browse files

Don't hide the pending point line if we are grabbing the first point.

2008-02-02  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimppolygonselecttool.c
	(gimp_polygon_select_tool_oper_update): Don't hide the pending
	point line if we are grabbing the first point.
	(gimp_polygon_select_tool_motion): Also update the pending point
	if we are moving the first point.

svn path=/trunk/; revision=24775
parent 8fd278b6
2008-02-02 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimppolygonselecttool.c
(gimp_polygon_select_tool_oper_update): Don't hide the pending
point line if we are grabbing the first point.
(gimp_polygon_select_tool_motion): Also update the pending point
if we are moving the first point.
2008-02-02 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimppolygonselecttool.c
......
......@@ -236,13 +236,20 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
if (tool->display == display)
{
gboolean hovering_first_point;
gimp_polygon_select_tool_select_closet_point (poly_sel_tool,
display,
coords);
hovering_first_point = gimp_polygon_select_tool_should_close (poly_sel_tool,
display,
coords);
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
if (poly_sel_tool->grabbed_point || poly_sel_tool->num_points == 0)
if (poly_sel_tool->num_points == 0 ||
(poly_sel_tool->grabbed_point && !hovering_first_point))
{
poly_sel_tool->show_pending_point = FALSE;
}
......@@ -250,9 +257,16 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
{
poly_sel_tool->show_pending_point = TRUE;
if (hovering_first_point)
{
poly_sel_tool->pending_point = poly_sel_tool->points[0];
}
else
{
poly_sel_tool->pending_point.x = coords->x;
poly_sel_tool->pending_point.y = coords->y;
}
}
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
......@@ -299,6 +313,14 @@ gimp_polygon_select_tool_motion (GimpTool *tool,
{
poly_sel_tool->grabbed_point->x = coords->x;
poly_sel_tool->grabbed_point->y = coords->y;
if (gimp_polygon_select_tool_should_close (poly_sel_tool,
display,
coords))
{
poly_sel_tool->pending_point.x = coords->x;
poly_sel_tool->pending_point.y = coords->y;
}
}
else
{
......
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