gimp r25972 - in trunk: . app/tools
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25972 - in trunk: . app/tools
- Date: Sat, 21 Jun 2008 09:39:49 +0000 (UTC)
Author: martinn
Date: Sat Jun 21 09:39:49 2008
New Revision: 25972
URL: http://svn.gnome.org/viewvc/gimp?rev=25972&view=rev
Log:
2008-06-21 Martin Nordholts <martinn svn gnome org>
* app/tools/gimpfreeselecttool.c
(gimp_free_select_tool_update_motion): When applying angle
constraints on the first segment vertex, base on the last segment
vertex rather than not applying any constraint at all.
Modified:
trunk/ChangeLog
trunk/app/tools/gimpfreeselecttool.c
Modified: trunk/app/tools/gimpfreeselecttool.c
==============================================================================
--- trunk/app/tools/gimpfreeselecttool.c (original)
+++ trunk/app/tools/gimpfreeselecttool.c Sat Jun 21 09:39:49 2008
@@ -1029,17 +1029,30 @@
{
priv->polygon_modified = TRUE;
- if (priv->constrain_angle &&
- priv->grabbed_segment_index > 0 &&
- priv->n_points > 0 )
+ if (priv->constrain_angle &&
+ priv->n_segment_indices > 1 )
{
gdouble start_point_x;
gdouble start_point_y;
+ gint segment_index;
+
+ /* Base constraints on the last segment vertex if we move
+ * the first one, otherwise base on the previous segment
+ * vertex
+ */
+ if (priv->grabbed_segment_index == 0)
+ {
+ segment_index = priv->n_segment_indices - 1;
+ }
+ else
+ {
+ segment_index = priv->grabbed_segment_index - 1;
+ }
gimp_free_select_tool_get_segment_point (fst,
&start_point_x,
&start_point_y,
- priv->grabbed_segment_index - 1);
+ segment_index);
gimp_tool_motion_constrain (start_point_x,
start_point_y,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]