Commit 695da29c authored by VAN TOLL Wouter's avatar VAN TOLL Wouter
Browse files

GUI bugfix: The refresh rate became incorrect when loading a new simulation...

GUI bugfix: The refresh rate became incorrect when loading a new simulation with a different framerate.
parent 48d336bc
......@@ -130,6 +130,11 @@ void UMANSOpenGLWidget::startNewSimulation(const std::string& scenarioFilename)
simulator = newSimulator;
// Prepare a timer for update events, using the current value of playbackMultiplier.
// This works for the very first simulation, because playbackMultiplier=1 by default.
// In other cases, the new simulation may use a different framerate than the previous one, so we need to re-initialize the timer.
......@@ -533,9 +538,6 @@ void UMANSOpenGLWidget::initializeGL()
// initialize the simulation
// prepare a timer for updating the simulation
......@@ -108,7 +108,7 @@ private:
bool inAgentSelectMode;
bool panning;
bool simulationRunning;
int playbackMultiplier;
int playbackMultiplier = 1;
bool makeScreenshotsPerFrame;
bool writeCSVOutput;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment