Commit b4175f3e authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen Committed by Hugo Beauzee-Luyssen

Corrected behaviour when stopping preview.

parent e8109689
......@@ -94,7 +94,7 @@ void WorkflowRenderer::initializeRenderer()
WorkflowRenderer::~WorkflowRenderer()
{
stop();
killRenderer();
delete m_videoEsHandler;
delete m_audioEsHandler;
......@@ -294,6 +294,15 @@ void WorkflowRenderer::internalPlayPause( bool forcePause )
}
void WorkflowRenderer::stop()
{
//Since we want permanent render (to have a permanent render update, we shouldn't
//stop, but pause
togglePlayPause( true );
m_mainWorkflow->setCurrentFrame( 0, MainWorkflow::Renderer );
}
void
WorkflowRenderer::killRenderer()
{
m_isRendering = false;
m_paused = false;
......
......@@ -88,8 +88,12 @@ class WorkflowRenderer : public GenericRenderer
*/
virtual void togglePlayPause( bool forcePause );
/**
* \brief Stop the renderer.
* \brief Stop the mainworkflow, but not the renderer.
*
* In order to provide premanent feedback (ie stay in paused mode when not
* playing, we have to never stop the renderer.
* \sa togglePlayPause( bool );
* \sa killRenderer();
*/
virtual void stop();
/**
......@@ -243,6 +247,14 @@ class WorkflowRenderer : public GenericRenderer
* \brief check for workflow related actions that has been stacked.
*/
void checkActions();
/**
* \brief Completely kill the renderer.
*
* This will stop both mainworkflow and renderer thread.
* This should only be used when destroying the renderer.
* \sa stop();
*/
void killRenderer();
protected:
/**
......
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