git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix show/hide scrollbar in automatic mode when entry was added/removed
[enigma2.git]
/
lib
/
gui
/
elistbox.cpp
diff --git
a/lib/gui/elistbox.cpp
b/lib/gui/elistbox.cpp
index 65b24503071eb1370e4d695f75a5dba49d65ad0b..3c188ad601c3ad9a864265f3fe3f9e3271233495 100644
(file)
--- a/
lib/gui/elistbox.cpp
+++ b/
lib/gui/elistbox.cpp
@@
-394,7
+394,9
@@
void eListbox::setSelectionEnable(int en)
void eListbox::entryAdded(int index)
{
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)
/* 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)
{
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);
m_selected = m_content->cursorGet();
moveSelection(justCheck);