From 67392e48a4bea19adeb0760e40e467b909995680 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) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5ba9c99a9aa12fc202c374945885fc0fef7ca364 Author: martii Date: 2013-07-20 (Sat, 20 Jul 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- 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)