CMovieBrowser: fix paint of screenshots/covers while scroll in movie list

Some covers were painted for entries without available cover image.
Slot OnAfterRefresh() was not really a good point to paint,
OnAfterScrollPage() seems a better solution.
This commit is contained in:
2016-01-17 20:54:39 +01:00
parent 35a08fc5dd
commit bee36d29f6

View File

@@ -1400,23 +1400,23 @@ void CMovieBrowser::refreshMovieInfo(void)
if (m_settings.gui != MB_GUI_FILTER && logo_ok) { if (m_settings.gui != MB_GUI_FILTER && logo_ok) {
lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - flogo_w -14; lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - flogo_w -14;
ly = m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2; ly = m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2;
if (pic == NULL){ if (pic == NULL){ //TODO: paint custom covers with different ratio, currently only works with default ratio 16/9 or 4/3
pic = new CComponentsPicture(lx+2, ly+1, flogo_w, flogo_h, fname, NULL, CC_SHADOW_OFF, COL_MENUCONTENTSELECTED_PLUS_0); pic = new CComponentsPicture(lx+2, ly+1, flogo_w, flogo_h, fname, NULL, CC_SHADOW_OFF, COL_MENUCONTENTSELECTED_PLUS_0);
pic->enableFrame(true, 2); pic->enableFrame(true, 2);
pic->enableCache(); pic->enableCache();
pic->doPaintBg(false); pic->doPaintBg(false);
}else{ }else
pic->setPicture(fname); pic->setPicture(fname);
}
if (!m_movieSelectionHandler->epgInfo2.empty()) if (!m_movieSelectionHandler->epgInfo2.empty())
m_pcInfo->OnAfterRefresh.connect(sigc::mem_fun(pic, &CComponentsPicture::paint0)); m_pcInfo->OnAfterScrollPage.connect(sigc::mem_fun(pic, &CComponentsPicture::paint0));
else
pic->paint0();
}else{ }else{
delete pic; delete pic;
pic = NULL; pic = NULL;
} }
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0); m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0);
if (pic)
pic->paint(CC_SAVE_SCREEN_NO);
} }
void CMovieBrowser::info_hdd_level(bool paint_hdd) void CMovieBrowser::info_hdd_level(bool paint_hdd)