From 737d17c8ed6e50718465043230e00901f632fe2c Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 16 Dec 2012 11:09:24 +0100 Subject: Fixed Bug that scrolling didn't work when jumping directly to a menuelement --- menuitem.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/menuitem.c b/menuitem.c index 212b996..91b7f2e 100644 --- a/menuitem.c +++ b/menuitem.c @@ -244,10 +244,10 @@ void cNopacityMainMenuItem::Render() { drawn = true; } SetTextShort(); - if (current && scrollable && config.menuScrollSpeed) { + if (current && scrollable && !Running() && config.menuScrollSpeed) { Start(); } - if (wasCurrent && scrollable && Running()) { + if (wasCurrent && !current && scrollable && Running()) { pixmapTextScroller->SetDrawPortPoint(cPoint(0, 0)); SetTextShort(); Cancel(-1); @@ -476,10 +476,10 @@ void cNopacityScheduleMenuItem::Render() { SetTextShort(); drawn = true; } - if (current && scrollable && config.menuScrollSpeed) { + if (current && scrollable && !Running() && config.menuScrollSpeed) { Start(); } - if (wasCurrent && scrollable && Running()) { + if (wasCurrent && !current && scrollable && Running()) { pixmapTextScroller->SetDrawPortPoint(cPoint(0, 0)); SetTextShort(); Cancel(-1); @@ -592,10 +592,10 @@ void cNopacityChannelMenuItem::Render() { drawn = true; } SetTextShort(); - if (current && scrollable && config.menuScrollSpeed) { + if (current && scrollable && !Running() && config.menuScrollSpeed) { Start(); } - if (wasCurrent && scrollable && Running()) { + if (wasCurrent && !current && scrollable && Running()) { pixmapTextScroller->SetDrawPortPoint(cPoint(0, 0)); SetTextShort(); Cancel(-1); @@ -680,10 +680,10 @@ void cNopacityDefaultMenuItem::Render() { } else break; } - if (current && scrollable && !Running() && config.menuScrollSpeed) { + if (current && scrollable && !Running() && config.menuScrollSpeed) { Start(); } - if (wasCurrent && (current != wasCurrent) && scrollable && Running()) { + if (wasCurrent && !current && scrollable && Running()) { pixmapTextScroller->SetDrawPortPoint(cPoint(0, 0)); SetTextShort(); Cancel(-1); -- cgit v1.2.3