app: use 0..1 axes in GimpCurveTool's curves widgets on != 8-bit images

This commit is contained in:
Michael Natterer 2013-06-13 00:23:49 +02:00
parent edca08e1c2
commit afb767fcc1
1 changed files with 11 additions and 0 deletions

View File

@ -218,6 +218,17 @@ gimp_curves_tool_initialize (GimpTool *tool,
histogram);
g_object_unref (histogram);
if (gimp_drawable_get_precision (drawable) == GIMP_PRECISION_U8)
{
gimp_curve_view_set_range_x (GIMP_CURVE_VIEW (c_tool->graph), 0, 255);
gimp_curve_view_set_range_y (GIMP_CURVE_VIEW (c_tool->graph), 0, 255);
}
else
{
gimp_curve_view_set_range_x (GIMP_CURVE_VIEW (c_tool->graph), 0.0, 1.0);
gimp_curve_view_set_range_y (GIMP_CURVE_VIEW (c_tool->graph), 0.0, 1.0);
}
return TRUE;
}