mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bug that detached viewelements were not cleared correctly
This commit is contained in:
parent
57999a442f
commit
f33354ba5a
4
HISTORY
4
HISTORY
@ -316,3 +316,7 @@ Version 0.4.5
|
||||
- added {numtimers} Token to lastrecordings viewelement
|
||||
- fixed time display bug in displaymenurecordings
|
||||
- added token {watched} to displaymenurecordings
|
||||
- fixed bug that scrapercontent in displaychannel was not
|
||||
updated if detached
|
||||
- fixed bug that detached viewelements were not cleared
|
||||
correctly
|
@ -354,14 +354,16 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
|
||||
}
|
||||
|
||||
if (DetachViewElement(veScraperContent)) {
|
||||
cViewElement *viewElement = GetViewElement(veScraperContent);
|
||||
cViewElementScraperContent *viewElement = dynamic_cast<cViewElementScraperContent*>(GetViewElement(veScraperContent));
|
||||
if (!viewElement) {
|
||||
viewElement = new cViewElementScraperContent(event, ctPosterBanner, tmplView->GetViewElement(veScraperContent));
|
||||
AddViewElement(veScraperContent, viewElement);
|
||||
viewElement->Start();
|
||||
} else {
|
||||
if (!viewElement->Starting())
|
||||
if (!viewElement->Starting()) {
|
||||
viewElement->SetEvent(event);
|
||||
viewElement->Render();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
map < string, string > stringTokens;
|
||||
|
@ -27,6 +27,7 @@ private:
|
||||
public:
|
||||
cViewElementScraperContent(const cEvent *event, ScraperContentType type, cTemplateViewElement *tmplViewElement);
|
||||
virtual ~cViewElementScraperContent() {};
|
||||
void SetEvent(const cEvent *event) { this->event = event; };
|
||||
bool Render(void);
|
||||
};
|
||||
|
||||
|
@ -183,6 +183,11 @@ void cView::DrawViewElement(eViewElement ve, map <string,string> *stringTokens,
|
||||
}
|
||||
|
||||
void cView::ClearViewElement(eViewElement ve) {
|
||||
cViewElement *detachedVE = GetViewElement(ve);
|
||||
if (detachedVE) {
|
||||
detachedVE->Clear();
|
||||
return;
|
||||
}
|
||||
cTemplateViewElement *viewElement = NULL;
|
||||
int currentAnimCat = ve;
|
||||
if (tmplViewElement) {
|
||||
@ -1103,6 +1108,10 @@ bool cViewElement::Render(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void cViewElement::Clear(void) {
|
||||
ClearViewElement(ve);
|
||||
}
|
||||
|
||||
void cViewElement::Action(void) {
|
||||
DoSleep(delay);
|
||||
if (!Running())
|
||||
|
@ -95,6 +95,7 @@ public:
|
||||
virtual ~cViewElement();
|
||||
void SetCallback(eViewElement ve, bool (cViewHelpers::*SetTokens)(bool, stringmap&, intmap&)) { this->ve = ve; this->SetTokens = SetTokens; };
|
||||
virtual bool Render(void);
|
||||
void Clear(void);
|
||||
bool Starting(void) { return Running(); };
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user