comparison src/MainWindow.cpp @ 330:df4899aef78f

Don't wait for analysis if auto-analysis is off
author Chris Cannam
date Fri, 13 Jun 2014 14:54:07 +0100
parents 67987c108807
children c17522292b24 ef298f4e16bf
comparison
equal deleted inserted replaced
329:67987c108807 330:df4899aef78f
1860 // Called before saving a session. We can't safely save while the 1860 // Called before saving a session. We can't safely save while the
1861 // initial analysis is happening, because then we end up with an 1861 // initial analysis is happening, because then we end up with an
1862 // incomplete session on reload. There are certainly theoretically 1862 // incomplete session on reload. There are certainly theoretically
1863 // better ways to handle this... 1863 // better ways to handle this...
1864 1864
1865 QSettings settings;
1866 settings.beginGroup("Analyser");
1867 bool autoAnalyse = settings.value("auto-analysis", true).toBool();
1868 settings.endGroup();
1869
1870 if (!autoAnalyse) {
1871 return true;
1872 }
1873
1865 if (!m_analyser || m_analyser->getInitialAnalysisCompletion() >= 100) { 1874 if (!m_analyser || m_analyser->getInitialAnalysisCompletion() >= 100) {
1866 return true; 1875 return true;
1867 } 1876 }
1868 1877
1869 QMessageBox mb(QMessageBox::Information, 1878 QMessageBox mb(QMessageBox::Information,