mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
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:
@@ -1,5 +1,7 @@
|
|||||||
CHANGES IN FLTK 1.1.8
|
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
|
- Changing the shorcut of a widget in fluid now marks
|
||||||
the document as dirty (STR #1382)
|
the document as dirty (STR #1382)
|
||||||
- Fl_Text_Editor now correctly handles middle mouse
|
- Fl_Text_Editor now correctly handles middle mouse
|
||||||
|
|||||||
@@ -241,21 +241,25 @@ int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
|
|||||||
switch (Fl::event_key()) {
|
switch (Fl::event_key()) {
|
||||||
case FL_Up:
|
case FL_Up:
|
||||||
if (horizontal()) return 0;
|
if (horizontal()) return 0;
|
||||||
|
handle_push();
|
||||||
handle_drag(clamp(increment(value(),-1)));
|
handle_drag(clamp(increment(value(),-1)));
|
||||||
handle_release();
|
handle_release();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Down:
|
case FL_Down:
|
||||||
if (horizontal()) return 0;
|
if (horizontal()) return 0;
|
||||||
|
handle_push();
|
||||||
handle_drag(clamp(increment(value(),1)));
|
handle_drag(clamp(increment(value(),1)));
|
||||||
handle_release();
|
handle_release();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Left:
|
case FL_Left:
|
||||||
if (!horizontal()) return 0;
|
if (!horizontal()) return 0;
|
||||||
|
handle_push();
|
||||||
handle_drag(clamp(increment(value(),-1)));
|
handle_drag(clamp(increment(value(),-1)));
|
||||||
handle_release();
|
handle_release();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Right:
|
case FL_Right:
|
||||||
if (!horizontal()) return 0;
|
if (!horizontal()) return 0;
|
||||||
|
handle_push();
|
||||||
handle_drag(clamp(increment(value(),1)));
|
handle_drag(clamp(increment(value(),1)));
|
||||||
handle_release();
|
handle_release();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user