mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
7bfee0413d
commit
1d31d62c30
|
@ -1,3 +1,10 @@
|
|||
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, "", "");
|
||||
|
|
Loading…
Reference in New Issue