Skip to content
Snippets Groups Projects
Commit d98cdcb3 authored by Andrew Wilson's avatar Andrew Wilson :elephant:
Browse files

Merge branch 'pauseFix' into 'master'

BUG: Viewers shouldn't be pausable by scene controller

See merge request iMSTK/iMSTK!532
parents 8e05f4ea abaaada9
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,10 @@ public:
bool getInit() const { return m_init; }
///
/// \brief Get whether the module is currently paused
/// \brief Set/Get whether the module is currently paused
///
bool getPaused() const { return m_paused; }
void setPaused(const bool paused) { m_paused = paused; }
ExecutionType getExecutionType() const { return m_executionType; }
void setExecutionType(ExecutionType type) { m_executionType = type; }
......
......@@ -74,16 +74,12 @@ KeyboardSceneControl::OnKeyPress(const char key)
// To ensure consistency toggle/invert based of m_sceneManager
const bool paused = sceneManager->getPaused();
// Resume or pause all modules
// Resume or pause all modules, expect viewers
for (auto module : driver->getModules())
{
if (paused)
if (std::dynamic_pointer_cast<Viewer>(module) == nullptr)
{
module->resume();
}
else
{
module->pause();
module->setPaused(!paused);
}
}
}
......
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