Skip to content

Commit

Permalink
addendum refs #1957
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Nov 28, 2018
1 parent bdcc719 commit c59843c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/gui/GUIApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SUMOTime> 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) {
Expand All @@ -1411,6 +1401,16 @@ GUIApplicationWindow::handleEvent_SimulationLoaded(GUIEvent* e) {
} else {
openNewView(defaultType);
}
if (!OptionsCont::getOptions().isDefault("breakpoints")) {
std::vector<SUMOTime> 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");
Expand Down

0 comments on commit c59843c

Please sign in to comment.