diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-13 00:59:14 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-13 00:59:14 +0000 |
| commit | 38e13f8a93952ce2b1855a9a9abf2c442c000985 (patch) | |
| tree | 3efba4ea487fc6848803d3fe43fd2714c1ed1786 /lib/gui/elistbox.cpp | |
| parent | 1a2572289b607810dfc4a91970a4576034c2e58a (diff) | |
| download | enigma2-38e13f8a93952ce2b1855a9a9abf2c442c000985.tar.gz enigma2-38e13f8a93952ce2b1855a9a9abf2c442c000985.zip | |
fix show/hide scrollbar in automatic mode when entry was added/removed
Diffstat (limited to 'lib/gui/elistbox.cpp')
| -rw-r--r-- | lib/gui/elistbox.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp index 65b24503..3c188ad6 100644 --- a/lib/gui/elistbox.cpp +++ b/lib/gui/elistbox.cpp @@ -394,7 +394,9 @@ void eListbox::setSelectionEnable(int en) void eListbox::entryAdded(int index) { - /* manage our local pointers. when the entry was added before the current position, we have to advance. */ + if (m_content && (m_content->size() % m_items_per_page) == 1) + m_content_changed=true; + /* manage our local pointers. when the entry was added before the current position, we have to advance. */ /* we need to check <= - when the new entry has the (old) index of the cursor, the cursor was just moved down. */ if (index <= m_selected) @@ -416,7 +418,10 @@ void eListbox::entryAdded(int index) void eListbox::entryRemoved(int index) { - if (index == m_selected && m_content) + if (m_content && !(m_content->size() % m_items_per_page)) + m_content_changed=true; + + if (index == m_selected && m_content) m_selected = m_content->cursorGet(); moveSelection(justCheck); |
