[vlmc-devel] MainWorkflow: Ensure to close the dialog only when rendering finishes successfully

Yikai Lu git at videolan.org
Tue Apr 4 04:03:30 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Apr  3 21:01:57 2017 -0500| [f1162695c29a5c11a904bb1dd252ee14ca44cb8b] | committer: Yikai Lu

MainWorkflow: Ensure to close the dialog only when rendering finishes successfully

> https://code.videolan.org/videolan/vlmc/commit/f1162695c29a5c11a904bb1dd252ee14ca44cb8b
---

 src/Workflow/MainWorkflow.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index f348d0e..995aa04 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -338,7 +338,6 @@ MainWorkflow::startRenderToFile( const QString &outputFileName, quint32 width, q
     WorkflowFileRendererDialog  dialog( width, height, input->playableLength(), m_renderer->eventWatcher() );
     dialog.setModal( true );
     dialog.setOutputFileName( outputFileName );
-    connect( &cEventWatcher, &OutputEventWatcher::stopped, &dialog, &WorkflowFileRendererDialog::accept );
     connect( &dialog, &WorkflowFileRendererDialog::stop, this, [&output]{ output.stop(); } );
     connect( m_renderer->eventWatcher(), &RendererEventWatcher::positionChanged, &dialog,
              [this, input, &dialog, width, height]( qint64 pos )
@@ -353,6 +352,7 @@ MainWorkflow::startRenderToFile( const QString &outputFileName, quint32 width, q
 
     connect( &cEventWatcher, &OutputEventWatcher::stopped, this, [&output]{ output.stop(); } );
     connect( this, &MainWorkflow::mainWorkflowEndReached, this, [&output]{ output.stop(); } );
+    connect( this, &MainWorkflow::mainWorkflowEndReached, &dialog, &WorkflowFileRendererDialog::accept );
 
     input->setPosition( 0 );
     output.start();



More information about the Vlmc-devel mailing list