From 5ba9c99a9aa12fc202c374945885fc0fef7ca364 Mon Sep 17 00:00:00 2001 From: martii Date: Sat, 20 Jul 2013 16:19:01 +0200 Subject: [PATCH] gui/widget/listframe: change up/down to use setSelectedLine() (fix) --- src/gui/widget/listframe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 93aca439c..e8c20a37f 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -512,7 +512,7 @@ void CListFrame::scrollLineDown(const int lines) if( !(m_nMode & SCROLL)) return; if( m_nNrOfLines <= 1) return; - setSelectedLine((m_nSelectedLine + lines) % (m_nNrOfLines - 1)); + setSelectedLine((m_nSelectedLine + lines) % m_nNrOfLines); } void CListFrame::scrollLineUp(const int lines) @@ -521,7 +521,7 @@ void CListFrame::scrollLineUp(const int lines) if( !(m_nMode & SCROLL)) return; if( m_nNrOfLines <= 1) return; - setSelectedLine((m_nNrOfLines - lines + m_nSelectedLine - 1) % (m_nNrOfLines - 1)); + setSelectedLine((m_nNrOfLines - lines + m_nSelectedLine - 1) % m_nNrOfLines); } void CListFrame::scrollPageDown(const int pages)