diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 33ebfdefb..e3b4c7eb8 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -564,13 +564,15 @@ EpgPlus::Footer::Footer(CFrameBuffer *pframeBuffer, int px, int py, int pwidth, this->x = px; this->y = py; this->width = pwidth; - + this->foot = NULL; this->buttonHeight = pbuttonHeight; this->buttonY = this->y - OFFSET_INTER - OFFSET_SHADOW - this->buttonHeight; } EpgPlus::Footer::~Footer() { + delete foot; + foot = NULL; } void EpgPlus::Footer::init() @@ -626,9 +628,11 @@ struct button_label buttonLabels[] = void EpgPlus::Footer::paintButtons(button_label *pbuttonLabels, int numberOfButtons) { int buttonWidth = (this->width); - CComponentsFooter foot; - foot.enableShadow(CC_SHADOW_ON, -1, true); - foot.paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth / numberOfButtons); + if (!foot) + foot = new CComponentsFooter(); + foot->enableShadow(CC_SHADOW_ON, -1, true); + if (!foot->isPainted()) + foot->paintButtons(this->x, this->buttonY, buttonWidth, buttonHeight, numberOfButtons, pbuttonLabels, buttonWidth / numberOfButtons); } EpgPlus::EpgPlus() @@ -1417,6 +1421,13 @@ void EpgPlus::hide() this->selectedChannelEntry->detailsLine = NULL; } + if (this->footer->foot) + { + this->footer->foot->kill(); + delete this->footer->foot; + this->footer->foot = NULL; + } + this->frameBuffer->paintBackgroundBoxRel(this->usableScreenX, this->usableScreenY, this->usableScreenWidth + OFFSET_SHADOW, this->usableScreenHeight + OFFSET_SHADOW); } diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index 9e5ea8b3e..e0747d2c6 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -264,6 +264,7 @@ class EpgPlus // attributes public: CFrameBuffer *frameBuffer; + CComponentsFooter *foot; int x; int y;