diff --git a/src/gui/GUIApplicationWindow.cpp b/src/gui/GUIApplicationWindow.cpp index 0c6935d4e72..c5a6fd2a36c 100644 --- a/src/gui/GUIApplicationWindow.cpp +++ b/src/gui/GUIApplicationWindow.cpp @@ -1392,16 +1392,6 @@ GUIApplicationWindow::handleEvent_SimulationLoaded(GUIEvent* e) { myRunThread->getBreakpoints().assign(settings.getBreakpoints().begin(), settings.getBreakpoints().end()); myRunThread->getBreakpointLock().unlock(); } - if (!OptionsCont::getOptions().isDefault("breakpoints")) { - std::vector breakpoints; - for (const std::string& val : OptionsCont::getOptions().getStringVector("breakpoints")) { - breakpoints.push_back(string2time(val)); - } - std::sort(breakpoints.begin(), breakpoints.end()); - myRunThread->getBreakpointLock().lock(); - myRunThread->getBreakpoints().assign(breakpoints.begin(), breakpoints.end()); - myRunThread->getBreakpointLock().unlock(); - } myJamSounds = settings.getEventDistribution("jam"); myCollisionSounds = settings.getEventDistribution("collision"); if (settings.getJamSoundTime() > 0) { @@ -1411,6 +1401,16 @@ GUIApplicationWindow::handleEvent_SimulationLoaded(GUIEvent* e) { } else { openNewView(defaultType); } + if (!OptionsCont::getOptions().isDefault("breakpoints")) { + std::vector breakpoints; + for (const std::string& val : OptionsCont::getOptions().getStringVector("breakpoints")) { + breakpoints.push_back(string2time(val)); + } + std::sort(breakpoints.begin(), breakpoints.end()); + myRunThread->getBreakpointLock().lock(); + myRunThread->getBreakpoints().assign(breakpoints.begin(), breakpoints.end()); + myRunThread->getBreakpointLock().unlock(); + } if (isGaming()) { setTitle("SUMO Interactive Traffic Light");