# HG changeset patch # User Chris Cannam # Date 1427810998 -3600 # Node ID 12f2c987e2b55b16a6355405df359637e62a5613 # Parent 692852208b6c992a9b6188e35915e2dbff1f6027 Wait for initial analysis to complete before loading (as well as saving) diff -r 692852208b6c -r 12f2c987e2b5 src/MainWindow.cpp --- a/src/MainWindow.cpp Tue Mar 31 15:09:38 2015 +0100 +++ b/src/MainWindow.cpp Tue Mar 31 15:09:58 2015 +0100 @@ -1161,10 +1161,10 @@ int lpwSize, bigLpwSize; #ifdef Q_OS_MAC lpwSize = m_viewManager->scalePixelSize(32); // Mac toolbars are fatter - bigLpwSize = lpwSize * 2.2; + bigLpwSize = int(lpwSize * 2.2); #else lpwSize = m_viewManager->scalePixelSize(26); - bigLpwSize = lpwSize * 2.8; + bigLpwSize = int(lpwSize * 2.8); #endif m_audioLPW->setImageSize(lpwSize); @@ -1951,7 +1951,7 @@ QMessageBox mb(QMessageBox::Information, tr("Waiting for analysis"), - tr("Waiting for initial analysis to complete before saving..."), + tr("Waiting for initial analysis to finish before loading or saving..."), QMessageBox::Cancel, this); @@ -2130,6 +2130,8 @@ if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); + if (!waitForInitialAnalysis()) return FileOpenCancelled; + QString path = source.getLocalFilename(); RDFImporter::RDFDocumentType rdfType = @@ -2214,6 +2216,8 @@ if (path == "") return; + if (!waitForInitialAnalysis()) return; + if (QFileInfo(path).suffix() == "") path += ".svl"; QString suffix = QFileInfo(path).suffix().toLower();