diff options
author | pieh <misiek.piechowiak@gmail.com> | 2011-08-30 23:26:33 +0200 |
---|---|---|
committer | pieh <misiek.piechowiak@gmail.com> | 2011-08-30 23:26:33 +0200 |
commit | 7e40ef635d1c04cc51e87d5ad54831f6df328f48 (patch) | |
tree | af654c685bd5252c0ae928b9a9bb9f547868c60e | |
parent | 898c8a141b403880c28f7a9ad7184d8e875ecfc8 (diff) |
fixed weird scrollbar behaviour when attached to wraplist
-rw-r--r-- | xbmc/guilib/GUIWrappingListContainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/guilib/GUIWrappingListContainer.cpp b/xbmc/guilib/GUIWrappingListContainer.cpp index 1fb4820a4c..2dca665068 100644 --- a/xbmc/guilib/GUIWrappingListContainer.cpp +++ b/xbmc/guilib/GUIWrappingListContainer.cpp @@ -41,7 +41,7 @@ void CGUIWrappingListContainer::UpdatePageControl(int offset) { if (m_pageControl) { // tell our pagecontrol (scrollbar or whatever) to update (offset it by our cursor position) - CGUIMessage msg(GUI_MSG_ITEM_SELECT, GetID(), m_pageControl, CorrectOffset(offset, GetCursor())); + CGUIMessage msg(GUI_MSG_ITEM_SELECT, GetID(), m_pageControl, CorrectOffset(offset, GetCursor()) % GetNumItems()); SendWindowMessage(msg); } } @@ -242,7 +242,7 @@ void CGUIWrappingListContainer::SetPageControlRange() { if (m_pageControl) { - CGUIMessage msg(GUI_MSG_LABEL_RESET, GetID(), m_pageControl, m_itemsPerPage, m_items.size() + m_itemsPerPage - 1); + CGUIMessage msg(GUI_MSG_LABEL_RESET, GetID(), m_pageControl, m_itemsPerPage, GetNumItems()); SendWindowMessage(msg); } } |