changeset 430:adfb2948fabf alignment_view

Wait for source files to be ready
author Chris Cannam
date Fri, 28 Nov 2014 10:33:25 +0000
parents a9141963b580
children d9d132c0e240
files framework/Align.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/framework/Align.cpp	Fri Nov 21 13:31:15 2014 +0000
+++ b/framework/Align.cpp	Fri Nov 28 10:33:25 2014 +0000
@@ -29,6 +29,7 @@
 
 #include <QProcess>
 #include <QSettings>
+#include <QApplication>
 
 bool
 Align::alignModel(Model *ref, Model *other)
@@ -174,6 +175,10 @@
 
     if (!rm) return false; // but this should have been tested already
 
+    while (!reference->isReady(0) || !rm->isReady(0)) {
+        qApp->processEvents();
+    }
+    
     // Run an external program, passing to it paths to the main
     // model's audio file and the new model's audio file. It returns
     // the path in CSV form through stdout.