changeset 238:cdb227563bc1

* Add pitch range in octaves, semitones and cents to the measurement rect as well as in Hz * Avoid crash when adding time ruler This commit contains a lot of debug output (will be slow)
author Chris Cannam
date Wed, 06 Feb 2008 16:21:29 +0000
parents 99fa3387dfef
children d936e3d77b95
files main/MainWindow.cpp sv.pro
diffstat 2 files changed, 17 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed Feb 06 14:15:09 2008 +0000
+++ b/main/MainWindow.cpp	Wed Feb 06 16:21:29 2008 +0000
@@ -2903,20 +2903,24 @@
 
 	} else {
 
-//	    newLayer = m_document->createMainModelLayer(type);
-            newLayer = m_document->createLayer(type);
-            if (m_document->isKnownModel(i->second.sourceModel)) {
-                m_document->setChannel(newLayer, i->second.channel);
-                m_document->setModel(newLayer, i->second.sourceModel);
+            if (!i->second.sourceModel) {
+                // e.g. time ruler
+                newLayer = m_document->createMainModelLayer(type);
             } else {
-                std::cerr << "WARNING: MainWindow::addLayer: unknown model "
-                          << i->second.sourceModel
-                          << " (\""
-                          << i->second.sourceModel->objectName().toStdString()
-                          << "\") in layer action map"
-                          << std::endl;
+                newLayer = m_document->createLayer(type);
+                if (m_document->isKnownModel(i->second.sourceModel)) {
+                    m_document->setChannel(newLayer, i->second.channel);
+                    m_document->setModel(newLayer, i->second.sourceModel);
+                } else {
+                    std::cerr << "WARNING: MainWindow::addLayer: unknown model "
+                              << i->second.sourceModel
+                              << " (\""
+                              << (i->second.sourceModel ? i->second.sourceModel->objectName().toStdString() : "")
+                              << "\") in layer action map"
+                              << std::endl;
+                }
             }
-	}
+        }
 
         if (newLayer) {
             m_document->addLayerToView(pane, newLayer);
--- a/sv.pro	Wed Feb 06 14:15:09 2008 +0000
+++ b/sv.pro	Wed Feb 06 16:21:29 2008 +0000
@@ -1,7 +1,7 @@
 
 TEMPLATE = app
 
-SV_UNIT_PACKAGES = vamp vamp-hostsdk fftw3f samplerate jack portaudio mad id3tag oggz fishsound lrdf raptor sndfile liblo rubberband
+SV_UNIT_PACKAGES = vamp vamp-hostsdk rubberband fftw3 fftw3f samplerate jack portaudio mad id3tag oggz fishsound lrdf raptor sndfile liblo
 load(../sv.prf)
 
 CONFIG += sv qt thread warn_on stl rtti exceptions