diff options
author | Christian <zerov83@gmail.com> | 2016-03-28 20:41:54 +0200 |
---|---|---|
committer | Christian <zerov83@gmail.com> | 2016-03-28 20:41:54 +0200 |
commit | bd3d480a94558344f0a55707bc59b181fc7ea943 (patch) | |
tree | d54aaa531c747df28950e0db542f9d9cb26874e0 /viewGridNavigator.cpp | |
parent | 495f828b507611fafa49997adf7f2bda815cdcb8 (diff) | |
download | vdr-plugin-plex-bd3d480a94558344f0a55707bc59b181fc7ea943.tar.gz vdr-plugin-plex-bd3d480a94558344f0a55707bc59b181fc7ea943.tar.bz2 |
paralleling cPictureCache.
Multiple server connections now possible
Diffstat (limited to 'viewGridNavigator.cpp')
-rw-r--r-- | viewGridNavigator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/viewGridNavigator.cpp b/viewGridNavigator.cpp index ec92c5f..804e39d 100644 --- a/viewGridNavigator.cpp +++ b/viewGridNavigator.cpp @@ -21,6 +21,7 @@ cViewGridNavigator::cViewGridNavigator(std::shared_ptr<skindesignerapi::cOsdView m_endIndex = 0; m_newDimensions = true; m_setIterator = true; + m_bEnableRedraw = false; m_pGrid = NULL; m_pRootView = rootView; @@ -36,7 +37,7 @@ void cViewGridNavigator::SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid> void cViewGridNavigator::ReDraw(cGridElement* element) { - if(m_bHidden) return; + if(m_bHidden || !m_bEnableRedraw) return; if(element) { cMutexLock MutexLock(&cPlexSdOsd::RedrawMutex); if (!element->IsVisible()) { @@ -73,6 +74,7 @@ void cViewGridNavigator::FilterElements(int scrollOffset) int i = 0; int pos = 0; + m_bEnableRedraw = false; for(auto it = m_vElements.begin(); it != m_vElements.end(); ++it) { if(i >= m_startIndex && i < m_endIndex) { @@ -86,16 +88,14 @@ void cViewGridNavigator::FilterElements(int scrollOffset) m_setIterator = false; } } else { - m_pGrid->Delete((*it)->GridElementId()); + if((*it)->Position > -1) m_pGrid->Delete((*it)->GridElementId()); (*it)->Dirty(); (*it)->Position = -1; (*it)->SetPosition(-1,-1); - // Remove Queued Downloads - cPictureCache::GetInstance().Remove(*it); } i++; } - + m_bEnableRedraw = true; m_newDimensions = false; } |