diff options
Diffstat (limited to 'guilib/GUIFixedListContainer.cpp')
-rw-r--r-- | guilib/GUIFixedListContainer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guilib/GUIFixedListContainer.cpp b/guilib/GUIFixedListContainer.cpp index 59b2d06dfd..4adaabf3a8 100644 --- a/guilib/GUIFixedListContainer.cpp +++ b/guilib/GUIFixedListContainer.cpp @@ -241,12 +241,16 @@ void CGUIFixedListContainer::SelectItem(int item) int minCursor, maxCursor; GetCursorRange(minCursor, maxCursor); + int cursor = m_cursor; if ((int)m_items.size() - 1 - item <= maxCursor - m_fixedCursor) - m_cursor = std::max(m_fixedCursor, maxCursor + item - (int)m_items.size() + 1); + cursor = std::max(m_fixedCursor, maxCursor + item - (int)m_items.size() + 1); else if (item <= m_fixedCursor - minCursor) - m_cursor = std::min(m_fixedCursor, minCursor + item); + cursor = std::min(m_fixedCursor, minCursor + item); else - m_cursor = m_fixedCursor; + cursor = m_fixedCursor; + if (cursor != m_cursor) + SetContainerMoving(cursor - m_cursor); + m_cursor = cursor; ScrollToOffset(item - m_cursor); } } |