fixed hiding of viewelemments when shifting

This commit is contained in:
louis 2016-04-16 09:18:51 +02:00
parent aec88498ff
commit 92553a8134
2 changed files with 9 additions and 0 deletions

View File

@ -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();
}

View File

@ -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();