Skip to content
Snippets Groups Projects
Commit 4528b606 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

Merge branch 'launchSimThreadUponStart' into 'master'

BUG: Launch the simulation thread even when simulation manager is started in PAUSED mode

See merge request iMSTK/iMSTK!257
parents 9ab0775c 2d72e97b
No related branches found
No related tags found
No related merge requests found
......@@ -348,6 +348,8 @@ SimulationManager::launchSimulation()
this->startModuleInNewThread(m_sceneManagerMap.at(m_activeSceneName));
m_status = SimulationStatus::RUNNING;
m_simThreadLaunched = true;
}
void
......@@ -384,9 +386,10 @@ SimulationManager::startSimulation(const SimulationStatus simStatus /*= Simulati
}
// Launch simulation right away if the simulator starts in running mode
if (simStatus == SimulationStatus::RUNNING)
this->launchSimulation();
if (simStatus == SimulationStatus::PAUSED)
{
this->launchSimulation();
this->pauseSimulation();
}
if (m_viewer)
......
......@@ -203,6 +203,8 @@ private:
std::shared_ptr<Viewer> m_viewer = nullptr;
std::shared_ptr<LogUtility> m_logUtil = std::make_shared<LogUtility>();
bool m_simThreadLaunched = false;
};
} // imstk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment