aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIFixedListContainer.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-01-12 23:32:11 +0000
committerjmarshallnz <jmarshallnz@svn>2010-01-12 23:32:11 +0000
commitb2d71839adeeb1694f0c0b8d22fe22c488e45f47 (patch)
treee2f1c7ac0fa24c2a7b53d19a007dae3c4b15c9fb /guilib/GUIFixedListContainer.cpp
parent1e14b6643a84f54f10aad3bb291cfa7b6da34dd7 (diff)
fixed: fixedlist didn't respond to <onnext> outside the <movement> range.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26737 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIFixedListContainer.cpp')
-rw-r--r--guilib/GUIFixedListContainer.cpp10
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);
}
}