git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
also handle -isystem
[enigma2.git]
/
lib
/
gui
/
elistbox.cpp
diff --git
a/lib/gui/elistbox.cpp
b/lib/gui/elistbox.cpp
index 6b2eace412f670e7d05d7a7c67b2b9dddfb1296f..5b05c028151a953d508bea32d642a6d37ff4afda 100644
(file)
--- a/
lib/gui/elistbox.cpp
+++ b/
lib/gui/elistbox.cpp
@@
-54,16
+54,10
@@
void eListbox::setWrapAround(bool state)
void eListbox::setContent(iListboxContent *content)
{
void eListbox::setContent(iListboxContent *content)
{
- int oldsel = m_selected;
m_content = content;
if (content)
m_content->setListbox(this);
entryReset();
m_content = content;
if (content)
m_content->setListbox(this);
entryReset();
- /* if oldsel != m_selected, selectionChanged was already
- emitted in entryReset. we want it in any case, so otherwise,
- emit it now. */
- if (oldsel == m_selected)
- /* emit */ selectionChanged();
}
bool eListbox::atBegin()
}
bool eListbox::atBegin()
@@
-457,6
+451,7
@@
void eListbox::entryReset(bool selectionHome)
{
m_content_changed = true;
m_prev_scrollbar_page = -1;
{
m_content_changed = true;
m_prev_scrollbar_page = -1;
+ int oldsel;
if (selectionHome)
{
if (selectionHome)
{
@@
-473,10
+468,15
@@
void eListbox::entryReset(bool selectionHome)
else
m_selected = 0;
m_content->cursorSet(m_selected);
else
m_selected = 0;
m_content->cursorSet(m_selected);
- selectionChanged();
}
}
+ oldsel = m_selected;
moveSelection(justCheck);
moveSelection(justCheck);
+ /* if oldsel != m_selected, selectionChanged was already
+ emitted in moveSelection. we want it in any case, so otherwise,
+ emit it now. */
+ if (oldsel == m_selected)
+ /* emit */ selectionChanged();
invalidate();
}
invalidate();
}