From 7fe8eeafb2d38367c07cb885e29c4d95c6d7ae9c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 14 Jan 2003 23:52:12 +0000 Subject: [PATCH] Fix Fl_Slider callback bug. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 +++ src/Fl_Slider.cxx | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5fe6c1f93..2ab1279a7 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/src/Fl_Slider.cxx b/src/Fl_Slider.cxx index 8a9b25684..e92f3d85d 100644 --- a/src/Fl_Slider.cxx +++ b/src/Fl_Slider.cxx @@ -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 $". //