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:
2012-09-03 08:48:38 +02:00
parent c0d4c204b2
commit 0d039171c0
2 changed files with 10 additions and 1 deletions

View File

@@ -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;};
};

View File

@@ -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()