VDR developer version 1.3.26
Commit Message
Klaus Schmidinger wrote:
> Well, looks like the change in handling "page down" in menus
> made it impossible to get the last page of a menu to display
> full screen. Here's a small fix for that:
Ok, now that this is completely broken, lets try to clean it up. ;)
The basic question is, how should VDR behave at the end of menus? The
previous behavior wasn't perfect either, resulting in back-jumps: While
paging down, the last page got displayed partially filled, and the next
page down actually moved the visible range up, to completely fill the
last page.
My suggestion is to avoid empty lines at the end of the menu completely,
whenever possible. The attached patch (against original 1.3.26) does
this, and also restores the old behavior on single-page menus.
Cheers,
Udo
Comments
Am 13.06.2005 um 15:50 schrieb Udo Richter:
> Ok, now that this is completely broken, lets try to clean it up. ;)
>
Thanks, your patch works great. Time for VDR 1.4 i guess ;)
Ciao, Dominique
@@ -350,6 +350,10 @@
current += displayMenuItems;
first += displayMenuItems;
int last = Count() - 1;
+ if (first + displayMenuItems > last) {
+ first = last - displayMenuItems + 1;
+ if (first < 0) first = 0;
+ }
int tmpCurrent = current;
while (!SelectableItem(tmpCurrent) && ++tmpCurrent <= last)
;