gimp r24775 - in trunk: . app/tools
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24775 - in trunk: . app/tools
- Date: Sat, 2 Feb 2008 09:45:49 +0000 (GMT)
Author: martinn
Date: Sat Feb 2 09:45:49 2008
New Revision: 24775
URL: http://svn.gnome.org/viewvc/gimp?rev=24775&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/tools/gimppolygonselecttool.c
Modified: trunk/app/tools/gimppolygonselecttool.c
==============================================================================
--- trunk/app/tools/gimppolygonselecttool.c (original)
+++ trunk/app/tools/gimppolygonselecttool.c Sat Feb 2 09:45:49 2008
@@ -236,13 +236,20 @@
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 @@
{
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 @@
{
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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]