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

use the newly added GimpGradient API to set the segment's handles instead

2004-06-03  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpgradienteditor.c (control_motion): use the newly
	added GimpGradient API to set the segment's handles instead of
	setting the values directly. Dirties the gradient correctly and
	makes the preview update instantly again. Fixes bug #143605.
parent 7bfee041
2004-06-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpgradienteditor.c (control_motion): use the newly
added GimpGradient API to set the segment's handles instead of
setting the values directly. Dirties the gradient correctly and
makes the preview update instantly again. Fixes bug #143605.
2004-06-03 Sven Neumann <sven@gimp.org>
* app/gui/file-open-location-dialog.c
......
......@@ -1389,9 +1389,7 @@ control_motion (GimpGradientEditor *editor,
pos = control_calc_g_pos (editor, x);
if (! editor->control_compress)
seg->prev->right = seg->left = CLAMP (pos,
seg->prev->middle + EPSILON,
seg->middle - EPSILON);
gimp_gradient_segment_set_left_pos (gradient, seg, pos);
else
control_compress_left (gradient,
editor->control_sel_l,
......@@ -1404,7 +1402,8 @@ control_motion (GimpGradientEditor *editor,
case GRAD_DRAG_MIDDLE:
pos = control_calc_g_pos (editor, x);
seg->middle = CLAMP (pos, seg->left + EPSILON, seg->right - EPSILON);
gimp_gradient_segment_set_middle_pos (gradient, seg, pos);
str = g_strdup_printf (_("Handle position: %0.6f"), seg->middle);
gradient_editor_set_hint (editor, str, "", "");
......
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