aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Amland <thomas.amland@gmail.com>2016-07-31 19:25:14 +0200
committerThomas Amland <thomas.amland@gmail.com>2016-07-31 19:58:12 +0200
commita0f72af516b6720a5cfd213396fa78b738ce3fa2 (patch)
tree3594e3df869127a18658f19538bc836abd5f3fa4
parent637b0af864eb5b5cb6d668056461675b93af4a3b (diff)
[listprovider] skip some checks when possible
-rw-r--r--xbmc/listproviders/DirectoryProvider.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/xbmc/listproviders/DirectoryProvider.cpp b/xbmc/listproviders/DirectoryProvider.cpp
index 241a1cb18d..17657413eb 100644
--- a/xbmc/listproviders/DirectoryProvider.cpp
+++ b/xbmc/listproviders/DirectoryProvider.cpp
@@ -214,8 +214,11 @@ bool CDirectoryProvider::Update(bool forceRefresh)
m_jobID = CJobManager::GetInstance().AddJob(new CDirectoryJob(m_currentUrl, m_currentSort, m_currentLimit, m_parentID), this);
}
- for (std::vector<CGUIStaticItemPtr>::iterator i = m_items.begin(); i != m_items.end(); ++i)
- changed |= (*i)->UpdateVisibility(m_parentID);
+ if (!changed)
+ {
+ for (std::vector<CGUIStaticItemPtr>::iterator i = m_items.begin(); i != m_items.end(); ++i)
+ changed |= (*i)->UpdateVisibility(m_parentID);
+ }
return changed; //! @todo Also returned changed if properties are changed (if so, need to update scroll to letter).
}