Commit 1f993427 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

set "identity" to TRUE if appropriate.

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.


svn path=/trunk/; revision=25708
parent e614d637
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.
2008-05-19 Sven Neumann <sven@gimp.org>
* app/core/gimpcurve-map.c (gimp_curve_map_pixels): fixed the call
......
......@@ -580,11 +580,11 @@ gimp_curve_reset (GimpCurve *curve,
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 @@ gimp_curve_set_n_points (GimpCurve *curve,
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 @@ gimp_curve_set_n_samples (GimpCurve *curve,
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 @@ gimp_curve_calculate (GimpCurve *curve)
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++)
{
......
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