fixed shiftout of viewelements which were not drawn at shiftin

This commit is contained in:
louis 2016-07-30 18:22:57 +02:00
parent 88982c3230
commit a2f9e616ee
1 changed files with 10 additions and 2 deletions

View File

@ -328,8 +328,13 @@ void cShifter::Init(void) {
stepYFast = (float)(end.Y() - start.Y()) * distanceFast / 100.0f / (float)stepsFast;
stepYSlow = (float)(end.Y() - start.Y()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast);
}
x = start.X();
y = start.Y();
if (shiftin) {
x = start.X();
y = start.Y();
} else {
x = end.X();
y = end.Y();
}
}
void cShifter::Reactivate(void) {
@ -337,6 +342,9 @@ void cShifter::Reactivate(void) {
finished = false;
shiftin = false;
step = 0;
if (start.X() == 0 && start.Y() == 0 && end.X() == 0 && end.Y() == 0) {
Init();
}
}
void cShifter::SetInitial(void) {