# HG changeset patch # User Chris Cannam # Date 1578322032 0 # Node ID 453029d6e9bfa63318fa3a9a1f444f1387f1b2c5 # Parent 55f317633b933eb77e8312e247cba7e2e7af679e Start work on spectrogram export code diff -r 55f317633b93 -r 453029d6e9bf framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Fri Dec 06 13:09:29 2019 +0000 +++ b/framework/MainWindowBase.cpp Mon Jan 06 14:47:12 2020 +0000 @@ -2797,13 +2797,14 @@ } bool -MainWindowBase::exportLayerTo(Layer *layer, QString path, QString &error) +MainWindowBase::exportLayerTo(Layer *layer, View *fromView, + QString path, QString &error) { if (QFileInfo(path).suffix() == "") path += ".svl"; QString suffix = QFileInfo(path).suffix().toLower(); - auto model = ModelById::get(layer->getModel()); + auto model = ModelById::get(layer->getExportModel(fromView)); if (!model) { error = tr("Internal error: unknown model"); return false; diff -r 55f317633b93 -r 453029d6e9bf framework/MainWindowBase.h --- a/framework/MainWindowBase.h Fri Dec 06 13:09:29 2019 +0000 +++ b/framework/MainWindowBase.h Mon Jan 06 14:47:12 2020 +0000 @@ -165,7 +165,8 @@ virtual bool saveSessionFile(QString path); virtual bool saveSessionTemplate(QString path); - virtual bool exportLayerTo(Layer *layer, QString path, QString &error); + virtual bool exportLayerTo(Layer *layer, View *fromView, + QString toPath, QString &error); void cueOSCScript(QString filename);