Commit 424eee43 authored by Martin Nordholts's avatar Martin Nordholts Committed by Martin Nordholts

Only draw the grabbed point, not all points. Drawing all points adds

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

	* app/tools/gimppolygonselecttool.c
	(gimp_polygon_select_tool_draw): Only draw the grabbed point, not
	all points. Drawing all points adds unnecessary clutter to the
	user interface.
	(gimp_polygon_select_tool_select_closest_point): Handle drawing of
	grabbed points.

svn path=/trunk/; revision=25004
parent 9cdd6092
2008-03-01 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimppolygonselecttool.c
(gimp_polygon_select_tool_draw): Only draw the grabbed point, not
all points. Drawing all points adds unnecessary clutter to the
user interface.
(gimp_polygon_select_tool_select_closest_point): Handle drawing of
grabbed points.
2008-02-29 Michael Natterer <mitch@gimp.org>
* app/gui/ige-mac-menu.[ch]: synced copies from upstream.
......
......@@ -511,17 +511,16 @@ static void
gimp_polygon_select_tool_draw (GimpDrawTool *draw_tool)
{
GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (draw_tool);
gint i;
gimp_draw_tool_draw_lines (draw_tool,
poly_sel_tool->points, poly_sel_tool->n_points,
FALSE, FALSE);
for (i = 0; i < poly_sel_tool->n_points; i++)
if (poly_sel_tool->grabbed_point)
{
gimp_draw_tool_draw_handle (draw_tool, GIMP_HANDLE_CIRCLE,
poly_sel_tool->points[i].x,
poly_sel_tool->points[i].y,
poly_sel_tool->grabbed_point->x,
poly_sel_tool->grabbed_point->y,
HANDLE_SIZE, HANDLE_SIZE,
GTK_ANCHOR_CENTER, FALSE);
}
......@@ -611,10 +610,9 @@ gimp_polygon_select_tool_select_closest_point (GimpPolygonSelectTool *poly_sel_t
{
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (poly_sel_tool);
gdouble shortest_dist = POINT_GRAB_THRESHOLD_SQ;
GimpVector2 *grabbed_point = NULL;
int i;
poly_sel_tool->grabbed_point = NULL;
for (i = 0; i < poly_sel_tool->n_points; i++)
{
gdouble dist;
......@@ -628,9 +626,18 @@ gimp_polygon_select_tool_select_closest_point (GimpPolygonSelectTool *poly_sel_t
if (dist < shortest_dist)
{
poly_sel_tool->grabbed_point = &poly_sel_tool->points[i];
grabbed_point = &poly_sel_tool->points[i];
}
}
if (grabbed_point != poly_sel_tool->grabbed_point)
{
gimp_draw_tool_pause(draw_tool);
poly_sel_tool->grabbed_point = grabbed_point;
gimp_draw_tool_resume(draw_tool);
}
}
static gboolean
......
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