aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/elistbox.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-30 16:08:15 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-11-30 16:08:15 +0000
commitad83142d636daacda163509898f0afeacf95fdd8 (patch)
treeb2c28dfec28930c24d13b103729c9ea61fb0acda /lib/gui/elistbox.cpp
parent7cd9e940139c1147608a27862fc838d79f254b41 (diff)
downloadenigma2-ad83142d636daacda163509898f0afeacf95fdd8.tar.gz
enigma2-ad83142d636daacda163509898f0afeacf95fdd8.zip
fix handy like jumping in sorted service list
Diffstat (limited to 'lib/gui/elistbox.cpp')
-rw-r--r--lib/gui/elistbox.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp
index ff5e2690..e2f1c26f 100644
--- a/lib/gui/elistbox.cpp
+++ b/lib/gui/elistbox.cpp
@@ -96,17 +96,16 @@ void eListbox::moveSelection(int dir)
/* now, look wether the current selection is out of screen */
m_selected = m_content->cursorGet();
-
- if (m_selected < m_top)
+
+ while (m_selected < m_top)
{
m_top -= m_items_per_page;
if (m_top < 0)
m_top = 0;
- } else if (m_selected >= m_top + m_items_per_page)
- {
- /* m_top should be always valid here as it's selected */
- m_top += m_items_per_page;
}
+ while (m_selected >= m_top + m_items_per_page)
+ /* m_top should be always valid here as it's selected */
+ m_top += m_items_per_page;
if (m_top != oldtop)
invalidate();