fixed bug that currentelement is not flushed if fadetime = 0

This commit is contained in:
louis 2016-02-21 15:09:35 +01:00
parent 803143ae3a
commit 0aab775201
2 changed files with 6 additions and 4 deletions

View File

@ -198,11 +198,12 @@ void cAnimation::Scroll(void) {
void cAnimation::Detach(void) {
if (waitOnWakeup) {
Wait();
int delay = 100 + detachable->Delay();
Sleep(delay);
int delay = 50 + detachable->Delay();
Sleep(delay);
} else {
int delay = detachable->Delay();
Sleep(delay);
if (delay > 0)
Sleep(delay);
}
if (!Running()) return;
detachable->ParseDetached();

View File

@ -463,7 +463,8 @@ bool cViewElement::Parse(bool forced) {
return true;
}
delete detacher;
detacher = new cAnimation((cDetachable*)this, waitOnWakeup, startAnimation);
bool isAnimated = (FadeTime() > 0) || (ShiftTime() > 0);
detacher = new cAnimation((cDetachable*)this, waitOnWakeup, startAnimation && isAnimated);
detacher->Start();
startAnimation = false;
init = false;