diff --git a/src/TimerCallback.cpp b/src/TimerCallback.cpp index 87e16cb7ac7120c604c094b7903fdc10cda4be12..23cd9ed39c5a41ae6b4cdd4730e60d2fac1c7f16 100644 --- a/src/TimerCallback.cpp +++ b/src/TimerCallback.cpp @@ -187,11 +187,12 @@ void TimerCallback::Execute(vtkObject *caller, unsigned long eventId, auto txtActor = tab.second->textActor; auto tactor = tab.second->tubeActor; auto tmapper = tab.second->tubeMapper; - - for(auto door: doors) + trainStart = trainStart + trackStart; + trainEnd = trainEnd + trackStart; + for(auto && door: doors) { - doorPoints.push_back(door.GetPoint1()); - doorPoints.push_back(door.GetPoint2()); + doorPoints.push_back(door.GetPoint1() + trainStart); + doorPoints.push_back(door.GetPoint2() + trainStart); }//doors if(once) {