set any parsed negative value as -1 in the curves object because that's

2008-06-25  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_load_cruft):
	set any parsed negative value as -1 in the curves object because
	that's the only negative value allowed.


svn path=/trunk/; revision=25987
This commit is contained in:
Michael Natterer 2008-06-25 08:13:57 +00:00 committed by Michael Natterer
parent db8369e7d1
commit e9c8fed84f
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-06-25 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpcurvesconfig.c (gimp_curves_config_load_cruft):
set any parsed negative value as -1 in the curves object because
that's the only negative value allowed.
2008-06-25 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsettingseditor.c

View File

@ -420,9 +420,14 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gimp_curve_set_curve_type (curve, GIMP_CURVE_SMOOTH);
for (j = 0; j < GIMP_CURVE_N_CRUFT_POINTS; j++)
gimp_curve_set_point (curve, j,
(gdouble) index[i][j] / 255.0,
(gdouble) value[i][j] / 255.0);
{
if (index[i][j] < 0 || value[i][j] < 0)
gimp_curve_set_point (curve, j, -1, -1);
else
gimp_curve_set_point (curve, j,
(gdouble) index[i][j] / 255.0,
(gdouble) value[i][j] / 255.0);
}
gimp_data_thaw (GIMP_DATA (curve));
}