From dadaa268a54ab3b0f9b1eb6e27d2608099611cbf Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 25 Apr 2013 23:06:35 +0200 Subject: [PATCH] CInfoViewer: ensure hide on deleted info file Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e30f4d276420ec6c6f9b94b332eb794ceac21e81 Author: Thilo Graf Date: 2013-04-25 (Thu, 25 Apr 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index b0fbbb153..e640b3032 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1818,8 +1818,11 @@ void CInfoViewer::showInfoFile() //exit if file not found, don't create an info object, delete old instance if required if (!file_size(infobar_file.c_str())) { - if (infobar_txt) + if (infobar_txt){ + if (infobar_txt->isPainted()) + infobar_txt->hide(); delete infobar_txt; + } infobar_txt = NULL; return; } @@ -1846,10 +1849,14 @@ void CInfoViewer::showInfoFile() //set some properties for info object infobar_txt->setDimensionsAll(xStart, yStart, width, height); infobar_txt->setCornerRadius(RADIUS_SMALL); - infobar_txt->setShadowOnOff(true); + infobar_txt->setShadowOnOff(true); + infobar_txt->setColorBody(COL_INFOBAR_PLUS_0); + infobar_txt->doPaintTextBoxBg(false); + + //paint info, don't save backscreen, if already painted, global hide is done by killTitle() + bool save_bg = !infobar_txt->isPainted(); + infobar_txt->paint(save_bg); - //paint info, don't save backscreen, hide not needed, is already done by killTitle() - infobar_txt->paint(CC_SAVE_SCREEN_NO); } void CInfoViewer::killTitle()