Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[gui] static content in lists didn't correctly take into account hidd…

…en items when determining which item to focus by default
  • Loading branch information...
commit 0c58c2fe78cbad85301b74905dba089f5750c520 1 parent 650829f
Jonathan Marshall authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 xbmc/listproviders/StaticProvider.cpp
View
9 xbmc/listproviders/StaticProvider.cpp
@@ -100,10 +100,15 @@ int CStaticListProvider::GetDefaultItem() const
{
if (m_defaultItem >= 0)
{
+ unsigned int offset = 0;
for (vector<CGUIStaticItemPtr>::const_iterator i = m_items.begin(); i != m_items.end(); ++i)
{
- if ((*i)->m_iprogramCount == m_defaultItem && (*i)->IsVisible())
- return i - m_items.begin();
+ if ((*i)->IsVisible())
+ {
+ if ((*i)->m_iprogramCount == m_defaultItem && (*i)->IsVisible())
+ return offset;
+ offset++;
+ }
}
}
return -1;
Please sign in to comment.
Something went wrong with that request. Please try again.