# HG changeset patch # User Chris Cannam # Date 1202314889 0 # Node ID cdb227563bc1b4698b61d91d8b2f3da379586070 # Parent 99fa3387dfef9b497c21ef7201e189f3118cc7c9 * 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) diff -r 99fa3387dfef -r cdb227563bc1 main/MainWindow.cpp --- 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); diff -r 99fa3387dfef -r cdb227563bc1 sv.pro --- 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