mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsPicture: fix hide() of picture box
After hide of a picture box, no paint was possible, this should fix this.
This commit is contained in:
@@ -221,6 +221,7 @@ class CComponentsPicture : public CComponentsContainer
|
||||
|
||||
inline bool isPicPainted(){return pic_painted;};
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void hide(bool no_restore = false);
|
||||
inline void getPictureSize(int *pwidth, int *pheight){*pwidth=pic_width; *pheight=pic_height;};
|
||||
|
||||
};
|
||||
|
@@ -220,6 +220,8 @@ void CComponentsContainer::paint(bool do_save_bg)
|
||||
//This could help to avoid ugly flicker efffects if it is necessary e.g. on often repaints, without changed contents.
|
||||
void CComponentsContainer::hideContainer(bool no_restore)
|
||||
{
|
||||
is_painted = false;
|
||||
|
||||
if (bgMode == CC_BGMODE_PERMANENT) {
|
||||
if (saved_screen.pixbuf) {
|
||||
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
||||
@@ -242,7 +244,6 @@ void CComponentsContainer::hideContainer(bool no_restore)
|
||||
v_fbdata.clear();
|
||||
firstPaint = true;
|
||||
}
|
||||
is_painted = false;
|
||||
}
|
||||
|
||||
void CComponentsContainer::hide(bool no_restore)
|
||||
@@ -806,6 +807,13 @@ void CComponentsPicture::paint(bool do_save_bg)
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentsPicture::hide(bool no_restore)
|
||||
{
|
||||
hideContainer(no_restore);
|
||||
pic_painted = false;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
//sub class CComponentsItemBox from CComponentsContainer
|
||||
CComponentsItemBox::CComponentsItemBox()
|
||||
|
Reference in New Issue
Block a user