diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-17 14:41:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-17 14:41:20 +0000 |
| commit | 6391946be0ae7200d893f70f8152cc1e7676faaf (patch) | |
| tree | 7a9279b7c0eab97b3072df35306477939d1701ee | |
| parent | 1cc3338a108cdfac480745e3dddb68a820777a46 (diff) | |
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
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/Fl_Slider.cxx | 4 |
2 files changed, 6 insertions, 0 deletions
@@ -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 diff --git a/src/Fl_Slider.cxx b/src/Fl_Slider.cxx index 0b58e924f..874ffa102 100644 --- a/src/Fl_Slider.cxx +++ b/src/Fl_Slider.cxx @@ -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; |
