mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed keeping the offset of the list cursor in case it is at the very top of the visible part of the list
This commit is contained in:
parent
bb4b6901ad
commit
746ce7d406
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osdbase.c 4.3 2017/11/07 15:42:47 kls Exp $
|
* $Id: osdbase.c 4.4 2018/03/06 10:38:18 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osdbase.h"
|
#include "osdbase.h"
|
||||||
@ -92,7 +92,7 @@ cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
|
|||||||
SetTitle(Title);
|
SetTitle(Title);
|
||||||
SetCols(c0, c1, c2, c3, c4);
|
SetCols(c0, c1, c2, c3, c4);
|
||||||
first = 0;
|
first = 0;
|
||||||
lastOffset = 0;
|
lastOffset = -1;
|
||||||
current = marked = -1;
|
current = marked = -1;
|
||||||
subMenu = NULL;
|
subMenu = NULL;
|
||||||
helpRed = helpGreen = helpYellow = helpBlue = NULL;
|
helpRed = helpGreen = helpYellow = helpBlue = NULL;
|
||||||
@ -282,9 +282,9 @@ void cOsdMenu::Display(void)
|
|||||||
void cOsdMenu::SetCurrent(cOsdItem *Item)
|
void cOsdMenu::SetCurrent(cOsdItem *Item)
|
||||||
{
|
{
|
||||||
current = Item ? Item->Index() : -1;
|
current = Item ? Item->Index() : -1;
|
||||||
if (current >= 0 && lastOffset > 0)
|
if (current >= 0 && lastOffset >= 0)
|
||||||
first = max(0, current - lastOffset);
|
first = max(0, current - lastOffset);
|
||||||
lastOffset = 0;
|
lastOffset = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOsdMenu::RefreshCurrent(void)
|
void cOsdMenu::RefreshCurrent(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user