gimp r25708 - in trunk: . app/core



Author: mitch
Date: Mon May 19 11:08:24 2008
New Revision: 25708
URL: http://svn.gnome.org/viewvc/gimp?rev=25708&view=rev

Log:
2008-05-19  Michael Natterer  <mitch gimp org>

	* app/core/gimpcurve.c
	(gimp_curve_set_n_points)
	(gimp_curve_set_n_samples): set "identity" to TRUE if appropriate.

	(gimp_curve_calculate): don't set it to TRUE when there are no
	control points.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpcurve.c

Modified: trunk/app/core/gimpcurve.c
==============================================================================
--- trunk/app/core/gimpcurve.c	(original)
+++ trunk/app/core/gimpcurve.c	Mon May 19 11:08:24 2008
@@ -580,11 +580,11 @@
       g_object_notify (G_OBJECT (curve), "curve-type");
     }
 
+  curve->identity = TRUE;
+
   g_object_thaw_notify (G_OBJECT (curve));
 
   gimp_data_dirty (GIMP_DATA (curve));
-
-  curve->identity = TRUE;
 }
 
 void
@@ -675,6 +675,9 @@
 
       g_object_notify (G_OBJECT (curve), "points");
 
+      if (curve->curve_type == GIMP_CURVE_SMOOTH)
+        curve->identity = TRUE;
+
       g_object_thaw_notify (G_OBJECT (curve));
     }
 }
@@ -709,6 +712,9 @@
 
       g_object_notify (G_OBJECT (curve), "samples");
 
+      if (curve->curve_type == GIMP_CURVE_FREE)
+        curve->identity = TRUE;
+
       g_object_thaw_notify (G_OBJECT (curve));
     }
 }
@@ -913,10 +919,6 @@
           for (i = boundary; i < curve->n_samples; i++)
             curve->samples[i] = point.y;
         }
-      else
-        {
-          curve->identity = TRUE;
-        }
 
       for (i = 0; i < num_pts - 1; i++)
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]