diff options
author | Christian <zerov83@gmail.com> | 2016-03-25 20:32:35 +0100 |
---|---|---|
committer | Christian <zerov83@gmail.com> | 2016-03-25 20:32:35 +0100 |
commit | 495f828b507611fafa49997adf7f2bda815cdcb8 (patch) | |
tree | 96b088065db72f51b9a1d7540e3f81e7b5ef5bcd | |
parent | 3ea2010e28e867503c98e0019344168682ddad75 (diff) | |
download | vdr-plugin-plex-495f828b507611fafa49997adf7f2bda815cdcb8.tar.gz vdr-plugin-plex-495f828b507611fafa49997adf7f2bda815cdcb8.tar.bz2 |
Fixes some display glitches in detailView
-rw-r--r-- | plexSdOsd.cpp | 8 | ||||
-rw-r--r-- | viewGridNavigator.cpp | 17 | ||||
-rw-r--r-- | viewGridNavigator.h | 3 |
3 files changed, 24 insertions, 4 deletions
diff --git a/plexSdOsd.cpp b/plexSdOsd.cpp index 6d9a6aa..dbbea64 100644 --- a/plexSdOsd.cpp +++ b/plexSdOsd.cpp @@ -121,11 +121,11 @@ eOSState cPlexSdOsd::ProcessKeyDetailView(eKeys Key) case kBack: state = eOSState::osContinue; m_pDetailGrid->Clear(); - m_pDetailsView->Deactivate(true); + m_pDetailGrid->Deactivate(true); m_pDetailGrid = nullptr; m_pDetailsView = nullptr; m_detailsActive = false; - m_pRootView->Activate(); + m_pBrowserGrid->Activate(); Flush(); break; case kYellow: @@ -229,11 +229,11 @@ void cPlexSdOsd::ShowDetails(plexclient::Video *vid) { if(m_detailsActive) return; - m_pRootView->Deactivate(true); + m_pBrowserGrid->Deactivate(true); m_pDetailsView = std::shared_ptr<skindesignerapi::cOsdView>(GetOsdView((int)eViews::detailView)); m_pDetailGrid = std::shared_ptr<cDetailView>(new cDetailView(m_pDetailsView, vid)); - m_pDetailsView->Activate(); + m_pDetailGrid->Activate(); m_pDetailGrid->Draw(); m_pDetailGrid->Flush(); m_detailsActive = true; diff --git a/viewGridNavigator.cpp b/viewGridNavigator.cpp index c6b3382..ec92c5f 100644 --- a/viewGridNavigator.cpp +++ b/viewGridNavigator.cpp @@ -36,6 +36,7 @@ void cViewGridNavigator::SetViewGrid(std::shared_ptr<skindesignerapi::cViewGrid> void cViewGridNavigator::ReDraw(cGridElement* element) { + if(m_bHidden) return; if(element) { cMutexLock MutexLock(&cPlexSdOsd::RedrawMutex); if (!element->IsVisible()) { @@ -258,3 +259,19 @@ bool cViewGridNavigator::NavigateRight() m_activeElementIter = next; return true; } + +void cViewGridNavigator::Deactivate(bool hide) +{ + if (m_pRootView) { + m_pRootView->Deactivate(hide); + m_bHidden = hide; + } +} + +void cViewGridNavigator::Activate() +{ + if (m_pRootView) { + m_pRootView->Activate(); + m_bHidden = false; + } +} diff --git a/viewGridNavigator.h b/viewGridNavigator.h index 2f6ad7e..1b1ae16 100644 --- a/viewGridNavigator.h +++ b/viewGridNavigator.h @@ -37,6 +37,7 @@ class cViewGridNavigator protected: int m_rows; int m_columns; + bool m_bHidden; std::shared_ptr<skindesignerapi::cOsdView> m_pRootView; std::shared_ptr<skindesignerapi::cViewGrid> m_pGrid; @@ -65,6 +66,8 @@ public: virtual eOSState NavigateBack() = 0; virtual void ReDraw(cGridElement* element); cGridElement* SelectedObject(); + virtual void Deactivate(bool hide); + virtual void Activate(); }; #endif // cViewGridNAVIGATOR_H |