Commit 6be90ad2 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

PreviewWidget: Minor logic refactoring

parent f60005f7
......@@ -121,16 +121,6 @@ PreviewWidget::frameChanged( qint64 currentFrame, Vlmc::FrameChangedReason reaso
}
}
void
PreviewWidget::on_pushButtonStop_clicked()
{
if ( m_previewStopped == false )
{
m_previewStopped = true;
m_renderer->stop();
}
}
void
PreviewWidget::on_pushButtonPlay_clicked()
{
......@@ -205,8 +195,17 @@ PreviewWidget::getGenericRenderer() const
void
PreviewWidget::stop()
{
//Ugly but avoid code dupplication.
on_pushButtonStop_clicked();
if ( m_previewStopped == false )
{
m_previewStopped = true;
m_renderer->stop();
}
}
void
PreviewWidget::on_pushButtonStop_clicked()
{
stop();
}
void
......
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