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
This commit is contained in:
Martin Nordholts 2008-02-02 09:45:49 +00:00 committed by Martin Nordholts
parent 8fd278b69e
commit 5700c67b01
2 changed files with 33 additions and 3 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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,8 +257,15 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
{
poly_sel_tool->show_pending_point = TRUE;
poly_sel_tool->pending_point.x = coords->x;
poly_sel_tool->pending_point.y = coords->y;
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
{