From 69476903ee126250b4eae7105ad74f40cf0f5285 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 14 Mar 2013 22:00:29 +0100 Subject: [PATCH] CComponentsForm/PIP: ensure hiding of minitv during hide of forms Handling of minitv items are different to other item types and need an explizit call of hide(). So it is possible to hide a form- object without a extra call of hide() for minitv objects. --- src/gui/components/cc_frm.cpp | 10 ++++++++++ src/gui/components/cc_item_tvpig.cpp | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 9e241cfc6..d6d40efda 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -281,6 +281,16 @@ void CComponentsForm::paintCCItems() void CComponentsForm::hide(bool no_restore) { + // hack: ensure hiding of minitv during hide of forms and inherited classes, + // because the handling of minitv items are different to other item types + // and need an explizit call of hide() + for(size_t i=0; igetItemType() == CComponentsItem::CC_ITEMTYPE_PIP){ + v_cc_items[i]->hide(); + break; + } + } + //hide body hideCCItem(no_restore); } diff --git a/src/gui/components/cc_item_tvpig.cpp b/src/gui/components/cc_item_tvpig.cpp index dffd857b3..a94e9cd4d 100644 --- a/src/gui/components/cc_item_tvpig.cpp +++ b/src/gui/components/cc_item_tvpig.cpp @@ -64,10 +64,10 @@ CComponentsPIP::CComponentsPIP( const int x_pos, const int y_pos, const int perc CComponentsPIP::~CComponentsPIP() { - hide(); - clearSavedScreen(); - clear(); - videoDecoder->Pig(-1, -1, -1, -1); + hide(); + videoDecoder->Pig(-1, -1, -1, -1); + clearSavedScreen(); + clear(); } void CComponentsPIP::paint(bool do_save_bg) @@ -79,6 +79,6 @@ void CComponentsPIP::paint(bool do_save_bg) void CComponentsPIP::hide(bool no_restore) { - hideCCItem(no_restore); videoDecoder->Pig(-1, -1, -1, -1); + hideCCItem(no_restore); }