mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsItem: add missing is_painted to hideCCItem()
This commit is contained in:
@@ -107,21 +107,25 @@ void CComponentsItem::paintInit(bool do_save_bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//restore last saved screen behind form box,
|
//restore last saved screen behind form box,
|
||||||
//Do use parameter 'no restore' to override temporarly the restore funtionality.
|
//Do use parameter 'no restore' to override the restore funtionality.
|
||||||
//This could help to avoid ugly flicker efffects if it is necessary e.g. on often repaints, without changed contents.
|
//For embedded items is it mostly not required to restore saved screens, so no_resore=true also is default parameter
|
||||||
|
//for such items.
|
||||||
|
//This member ensures demage of already existing screen buffer too, if parameter no_restore was changed while runtime.
|
||||||
void CComponentsItem::hideCCItem(bool no_restore)
|
void CComponentsItem::hideCCItem(bool no_restore)
|
||||||
{
|
{
|
||||||
is_painted = false;
|
//restore saved screen if available
|
||||||
|
|
||||||
if (saved_screen.pixbuf) {
|
if (saved_screen.pixbuf) {
|
||||||
frameBuffer->waitForIdle("CComponentsItem::hideCCItem()");
|
frameBuffer->waitForIdle("CComponentsItem::hideCCItem()");
|
||||||
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
frameBuffer->RestoreScreen(saved_screen.x, saved_screen.y, saved_screen.dx, saved_screen.dy, saved_screen.pixbuf);
|
||||||
if (no_restore) {
|
|
||||||
delete[] saved_screen.pixbuf;
|
if (no_restore) { //on parameter no restore=true delete saved screen if available
|
||||||
saved_screen.pixbuf = NULL;
|
delete[] saved_screen.pixbuf;
|
||||||
firstPaint = true;
|
saved_screen.pixbuf = NULL;
|
||||||
}
|
firstPaint = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_painted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsItem::hide(bool no_restore)
|
void CComponentsItem::hide(bool no_restore)
|
||||||
|
Reference in New Issue
Block a user