Fixed callback sometimes not calle when using the arrow keys in an Fl_Slider (STR #1333)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-08-17 14:41:20 +00:00
parent 1cc3338a10
commit 6391946be0
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.8
- Fixed callback not called when using arrow keys
in Fl_Slider (STR #1333)
- Changing the shorcut of a widget in fluid now marks
the document as dirty (STR #1382)
- Fl_Text_Editor now correctly handles middle mouse

View File

@ -241,21 +241,25 @@ int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
switch (Fl::event_key()) {
case FL_Up:
if (horizontal()) return 0;
handle_push();
handle_drag(clamp(increment(value(),-1)));
handle_release();
return 1;
case FL_Down:
if (horizontal()) return 0;
handle_push();
handle_drag(clamp(increment(value(),1)));
handle_release();
return 1;
case FL_Left:
if (!horizontal()) return 0;
handle_push();
handle_drag(clamp(increment(value(),-1)));
handle_release();
return 1;
case FL_Right:
if (!horizontal()) return 0;
handle_push();
handle_drag(clamp(increment(value(),1)));
handle_release();
return 1;