Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 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 |
comparison
equal
deleted
inserted
replaced
720:55f317633b93 | 721:453029d6e9bf |
---|---|
2795 return false; | 2795 return false; |
2796 } | 2796 } |
2797 } | 2797 } |
2798 | 2798 |
2799 bool | 2799 bool |
2800 MainWindowBase::exportLayerTo(Layer *layer, QString path, QString &error) | 2800 MainWindowBase::exportLayerTo(Layer *layer, View *fromView, |
2801 QString path, QString &error) | |
2801 { | 2802 { |
2802 if (QFileInfo(path).suffix() == "") path += ".svl"; | 2803 if (QFileInfo(path).suffix() == "") path += ".svl"; |
2803 | 2804 |
2804 QString suffix = QFileInfo(path).suffix().toLower(); | 2805 QString suffix = QFileInfo(path).suffix().toLower(); |
2805 | 2806 |
2806 auto model = ModelById::get(layer->getModel()); | 2807 auto model = ModelById::get(layer->getExportModel(fromView)); |
2807 if (!model) { | 2808 if (!model) { |
2808 error = tr("Internal error: unknown model"); | 2809 error = tr("Internal error: unknown model"); |
2809 return false; | 2810 return false; |
2810 } | 2811 } |
2811 | 2812 |