changeset 643:713b9a6b284a

Provide path, not just initial format, to dialog to enable re-guessing if user changes separator
author Chris Cannam
date Wed, 09 Jan 2019 14:42:25 +0000
parents 92ad94dee103
children 6fd0ebfd2bbe
files framework/MainWindowBase.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Tue Jan 08 15:19:03 2019 +0000
+++ b/framework/MainWindowBase.cpp	Wed Jan 09 14:42:25 2019 +0000
@@ -1886,9 +1886,11 @@
                 (path, &midiDlg, getMainModel()->getSampleRate());
         
             if (!model) {
-                CSVFormat format(path);
-                format.setSampleRate(getMainModel()->getSampleRate());
-                CSVFormatDialog *dialog = new CSVFormatDialog(this, format);
+                CSVFormatDialog *dialog =
+                    new CSVFormatDialog(this,
+                                        path,
+                                        getMainModel()->getSampleRate(),
+                                        5);
                 if (dialog->exec() == QDialog::Accepted) {
                     model = DataFileReaderFactory::loadCSV
                         (path, dialog->getFormat(),