From: Andreas Monzner Date: Mon, 17 Apr 2006 15:03:35 +0000 (+0000) Subject: move cursor to valid position when current is invalid (on call invalidate) X-Git-Tag: 2.6.0~3608 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/7e4013c449a7dbb31fb6a67106b913bf22a61334 move cursor to valid position when current is invalid (on call invalidate) --- diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index afffbbe4..261c548b 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -214,7 +214,12 @@ void eListboxPythonStringContent::invalidateEntry(int index) void eListboxPythonStringContent::invalidate() { if (m_listbox) + { + int s = size(); + if ( m_cursor >= s ) + m_listbox->moveSelectionTo(s?s-1:0); m_listbox->invalidate(); + } } //////////////////////////////////////