mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed scrolling the 'Channels' menu in case the cursor ends up on a group delimiter
This commit is contained in:
10
osd.c
10
osd.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: osd.c 1.21 2002/03/10 16:18:06 kls Exp $
|
||||
* $Id: osd.c 1.22 2002/03/24 11:23:23 kls Exp $
|
||||
*/
|
||||
|
||||
#include "osd.h"
|
||||
@@ -288,6 +288,10 @@ void cOsdMenu::PageUp(void)
|
||||
first -= MAXOSDITEMS;
|
||||
if (first < 0)
|
||||
first = current = 0;
|
||||
if (SpecialItem(current)) {
|
||||
current -= (current > 0) ? 1 : -1;
|
||||
first = min(first, current - 1);
|
||||
}
|
||||
Display();
|
||||
DisplayCurrent(true);
|
||||
}
|
||||
@@ -302,6 +306,10 @@ void cOsdMenu::PageDown(void)
|
||||
current = Count() - 1;
|
||||
first = Count() - MAXOSDITEMS;
|
||||
}
|
||||
if (SpecialItem(current)) {
|
||||
current += (current < Count() - 1) ? 1 : -1;
|
||||
first = max(first, current - MAXOSDITEMS);
|
||||
}
|
||||
Display();
|
||||
DisplayCurrent(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user