diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 88ba5388d..edce4913f 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -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;}; }; diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index 60c08e81f..b9bf8e782 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -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()