Fix Fl_Slider callback bug.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2003-01-14 23:52:12 +00:00
parent 717aa7ec8f
commit 7fe8eeafb2
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,9 @@
CHANGES IN FLTK 1.1.3
- Documentation updates.
- Fl_Slider didn't call the callback function when the
user changed the value using the keyboard and the
"when" condition was FL_WHEN_RELEASE. [SF Bug #647072]
- Lines with less than 2 unique vertices and polygons
with less the 3 unique vertices were not drawn
properly. [SF Bug #647067]

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.11 2002/10/24 12:53:41 easysw Exp $"
// "$Id: Fl_Slider.cxx,v 1.8.2.10.2.12 2003/01/14 23:52:12 easysw Exp $"
//
// Slider widget for the Fast Light Tool Kit (FLTK).
//
@ -244,18 +244,22 @@ int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
case FL_Up:
if (horizontal()) return 0;
handle_drag(clamp(increment(value(),-1)));
handle_release();
return 1;
case FL_Down:
if (horizontal()) return 0;
handle_drag(clamp(increment(value(),1)));
handle_release();
return 1;
case FL_Left:
if (!horizontal()) return 0;
handle_drag(clamp(increment(value(),-1)));
handle_release();
return 1;
case FL_Right:
if (!horizontal()) return 0;
handle_drag(clamp(increment(value(),1)));
handle_release();
return 1;
default:
return 0;
@ -286,5 +290,5 @@ int Fl_Slider::handle(int event) {
}
//
// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.11 2002/10/24 12:53:41 easysw Exp $".
// End of "$Id: Fl_Slider.cxx,v 1.8.2.10.2.12 2003/01/14 23:52:12 easysw Exp $".
//