diff --git a/coreengine/animation.c b/coreengine/animation.c index 90756b4..b3519de 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -325,6 +325,7 @@ void cAnimation::Shift(void) { shiftable->SetStartShifting(); uint64_t start = cTimeMs::Now(); + bool finished = false; while (Running() || !modeIn) { uint64_t now = cTimeMs::Now(); if (Running() || !modeIn) @@ -336,6 +337,7 @@ void cAnimation::Shift(void) { cCondWait::SleepMs(frametime - delta); } if ((int)(now - start) > shifttime) { + finished = true; if ((Running() && modeIn) && pos != shiftend) { shiftable->SetPosition(shiftend, shiftend); shiftable->Flush(); @@ -354,6 +356,9 @@ void cAnimation::Shift(void) { pos.Set(pos.X() - stepX, pos.Y() - stepY); } } + if (!finished) { + shiftable->SetPosition(shiftend, shiftend); + } shiftable->SetEndShifting(); } diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 46bebce..9e806cf 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -283,6 +283,10 @@ void cViewElement::Clear(bool forceClearBackground) { } void cViewElement::Hide(void) { + delete shifter; + shifter = NULL; + delete fader; + fader = NULL; for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) { sdOsd->Lock(); node->Hide();