changeset 721:453029d6e9bf spectrogram-export

Start work on spectrogram export code
author Chris Cannam
date Mon, 06 Jan 2020 14:47:12 +0000
parents 55f317633b93
children b06b18c15fd4
files framework/MainWindowBase.cpp framework/MainWindowBase.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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);