projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17909dd
)
fixed: #10841 - Control.SetFocus(id,position) failed for position > items.size()
author
jmarshallnz
<jmarshallnz@svn>
Mon, 6 Dec 2010 07:28:26 +0000
(07:28 +0000)
committer
jmarshallnz
<jmarshallnz@svn>
Mon, 6 Dec 2010 07:28:26 +0000
(07:28 +0000)
(cherry picked from commit
3fc4ef73814f62bce7f619487ffa6e87ad30be01
)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@35582
568bbfeb
-2a22-0410-94d2-
cc84cf5bfa90
guilib/GUIListContainer.cpp
patch
|
blob
|
history
diff --git
a/guilib/GUIListContainer.cpp
b/guilib/GUIListContainer.cpp
index
f37fc7e
..
306f9ce
100644
(file)
--- a/
guilib/GUIListContainer.cpp
+++ b/
guilib/GUIListContainer.cpp
@@
-126,7
+126,10
@@
bool CGUIListContainer::OnMessage(CGUIMessage& message)
else if (message.GetMessage() == GUI_MSG_SETFOCUS)
{
if (message.GetParam1()) // subfocus item is specified, so set the offset appropriately
- m_cursor = (int)message.GetParam1() - 1;
+ {
+ int item = std::min(m_offset + (int)message.GetParam1() - 1, (int)m_items.size() - 1);
+ SelectItem(item);
+ }
}
}
return CGUIBaseContainer::OnMessage(message);