From f2b6286ecb2062420d9b755c026efaaec3bf7abf Mon Sep 17 00:00:00 2001 From: djairoh Date: Sun, 5 May 2024 23:27:30 +0200 Subject: [PATCH] code style fix --- vtk/src/commands/TimerCallbackCommand.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/vtk/src/commands/TimerCallbackCommand.cpp b/vtk/src/commands/TimerCallbackCommand.cpp index 2cad359..75e416b 100644 --- a/vtk/src/commands/TimerCallbackCommand.cpp +++ b/vtk/src/commands/TimerCallbackCommand.cpp @@ -18,16 +18,15 @@ void TimerCallbackCommand::Execute(vtkObject* caller, unsigned long eventId, voi if (eventId == vtkCommand::KeyPressEvent and not strcmp("space", intr->GetKeySym())) { this->paused = ! this->paused; } else if (eventId == vtkCommand::TimerEvent and not this->paused) { - this->time += this->dt; - - if (this->time >= this->maxTime) { - return; - // TODO: how do we deal with reaching the end of the simulated dataset? Do we just stop simulating, loop back around? What about the location of the particles in this case? Just some ideas to consider, but we should iron this out pretty soon. + this->time += this->dt; + + if (this->time >= this->maxTime) { + return; + // TODO: how do we deal with reaching the end of the simulated dataset? Do we just stop simulating, loop back around? What about the location of the particles in this case? Just some ideas to consider, but we should iron this out pretty soon. + } + + this->program->updateData(this->time); } - - this->program->updateData(this->time); - } - } void TimerCallbackCommand::setProgram(Program *program) {