X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fgui%2Felistbox.cpp;h=e2f1c26f878691063247a066fe25aa18b36a2d7f;hp=ff5e2690bbbb0c126009a5f4123b364029b0d514;hb=ad83142d636daacda163509898f0afeacf95fdd8;hpb=7cd9e940139c1147608a27862fc838d79f254b41 diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index ff5e269..e2f1c26 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();