[vlmc-devel] PreviewWidget: Minor logic refactoring
Hugo Beauzée-Luyssen
git at videolan.org
Sun Feb 16 01:34:58 CET 2014
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Feb 16 01:48:18 2014 +0200| [6be90ad23011f2fd9a55bc70c38e89e36a39ed64] | committer: Hugo Beauzée-Luyssen
PreviewWidget: Minor logic refactoring
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=6be90ad23011f2fd9a55bc70c38e89e36a39ed64
---
src/Gui/preview/PreviewWidget.cpp | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/Gui/preview/PreviewWidget.cpp b/src/Gui/preview/PreviewWidget.cpp
index b31851e..c36ddd4 100644
--- a/src/Gui/preview/PreviewWidget.cpp
+++ b/src/Gui/preview/PreviewWidget.cpp
@@ -122,16 +122,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()
{
if ( m_previewStopped == true )
@@ -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
More information about the Vlmc-devel
mailing list