mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed hiding of viewelemments when shifting
This commit is contained in:
parent
aec88498ff
commit
92553a8134
@ -325,6 +325,7 @@ void cAnimation::Shift(void) {
|
|||||||
|
|
||||||
shiftable->SetStartShifting();
|
shiftable->SetStartShifting();
|
||||||
uint64_t start = cTimeMs::Now();
|
uint64_t start = cTimeMs::Now();
|
||||||
|
bool finished = false;
|
||||||
while (Running() || !modeIn) {
|
while (Running() || !modeIn) {
|
||||||
uint64_t now = cTimeMs::Now();
|
uint64_t now = cTimeMs::Now();
|
||||||
if (Running() || !modeIn)
|
if (Running() || !modeIn)
|
||||||
@ -336,6 +337,7 @@ void cAnimation::Shift(void) {
|
|||||||
cCondWait::SleepMs(frametime - delta);
|
cCondWait::SleepMs(frametime - delta);
|
||||||
}
|
}
|
||||||
if ((int)(now - start) > shifttime) {
|
if ((int)(now - start) > shifttime) {
|
||||||
|
finished = true;
|
||||||
if ((Running() && modeIn) && pos != shiftend) {
|
if ((Running() && modeIn) && pos != shiftend) {
|
||||||
shiftable->SetPosition(shiftend, shiftend);
|
shiftable->SetPosition(shiftend, shiftend);
|
||||||
shiftable->Flush();
|
shiftable->Flush();
|
||||||
@ -354,6 +356,9 @@ void cAnimation::Shift(void) {
|
|||||||
pos.Set(pos.X() - stepX, pos.Y() - stepY);
|
pos.Set(pos.X() - stepX, pos.Y() - stepY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!finished) {
|
||||||
|
shiftable->SetPosition(shiftend, shiftend);
|
||||||
|
}
|
||||||
shiftable->SetEndShifting();
|
shiftable->SetEndShifting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,6 +283,10 @@ void cViewElement::Clear(bool forceClearBackground) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cViewElement::Hide(void) {
|
void cViewElement::Hide(void) {
|
||||||
|
delete shifter;
|
||||||
|
shifter = NULL;
|
||||||
|
delete fader;
|
||||||
|
fader = NULL;
|
||||||
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
||||||
sdOsd->Lock();
|
sdOsd->Lock();
|
||||||
node->Hide();
|
node->Hide();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user