fixed ending of animations

This commit is contained in:
louis 2016-05-27 12:13:39 +02:00
parent aa8370363a
commit ed8273883e
3 changed files with 14 additions and 13 deletions

View File

@ -224,11 +224,11 @@ void cAnimation::Detach(void) {
if (delay > 0)
Sleep(delay);
}
if (!Running()) return;
//if (!Running()) return;
detachable->ParseDetached();
if (!Running()) return;
//if (!Running()) return;
detachable->RenderDetached();
if (!Running()) return;
//if (!Running()) return;
if (!doAnimation)
detachable->Flush(false);
if (!Running()) return;

View File

@ -299,10 +299,7 @@ void cViewElement::Clear(bool forceClearBackground) {
}
void cViewElement::Hide(void) {
delete shifter;
shifter = NULL;
delete fader;
fader = NULL;
StopAnimation();
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
sdOsd->Lock();
node->Hide();
@ -328,12 +325,7 @@ void cViewElement::WakeUp(void) {
}
void cViewElement::Close(void) {
delete detacher;
detacher = NULL;
delete fader;
fader = NULL;
delete shifter;
shifter = NULL;
StopAnimation();
StopScrolling();
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
node->StopBlinkers();
@ -581,3 +573,11 @@ cPoint cViewElement::ShiftStart(cRect &shiftbox) {
return start;
}
void cViewElement::StopAnimation(void) {
delete detacher;
detacher = NULL;
delete shifter;
shifter = NULL;
delete fader;
fader = NULL;
}

View File

@ -43,6 +43,7 @@ protected:
void InheritTokenContainerDeep(void);
virtual bool DoScroll(void) { return true; };
cPoint ShiftStart(cRect &shiftbox);
void StopAnimation(void);
public:
cViewElement(void);
cViewElement(const cViewElement &other);