mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 03:15:21 +08:00
Fix Hold Browser callback with FL_WHEN_NOT_CHANGED when up/down is pressed
This commit is contained in:
+6
-3
@@ -718,13 +718,16 @@ int Fl_Browser_::handle(int event) {
|
|||||||
switch (Fl::event_key()) {
|
switch (Fl::event_key()) {
|
||||||
case FL_Down:
|
case FL_Down:
|
||||||
while ((l = item_next(l))) {
|
while ((l = item_next(l))) {
|
||||||
if (item_height(l)>0) {select_only(l, when()); break;}
|
if (item_height(l)>0) {
|
||||||
|
select_only(l, when() & ~FL_WHEN_NOT_CHANGED);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
case FL_Up:
|
case FL_Up:
|
||||||
while ((l = item_prev(l))) {
|
while ((l = item_prev(l))) {
|
||||||
if (item_height(l)>0) {
|
if (item_height(l)>0) {
|
||||||
select_only(l, when());
|
select_only(l, when() & ~FL_WHEN_NOT_CHANGED);
|
||||||
break; // no need to test wp (return 1)
|
break; // no need to test wp (return 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user