comparison framework/MainWindowBase.cpp @ 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 fffb78793ca7
children 6fd0ebfd2bbe
comparison
equal deleted inserted replaced
642:92ad94dee103 643:713b9a6b284a
1884 1884
1885 Model *model = DataFileReaderFactory::loadNonCSV 1885 Model *model = DataFileReaderFactory::loadNonCSV
1886 (path, &midiDlg, getMainModel()->getSampleRate()); 1886 (path, &midiDlg, getMainModel()->getSampleRate());
1887 1887
1888 if (!model) { 1888 if (!model) {
1889 CSVFormat format(path); 1889 CSVFormatDialog *dialog =
1890 format.setSampleRate(getMainModel()->getSampleRate()); 1890 new CSVFormatDialog(this,
1891 CSVFormatDialog *dialog = new CSVFormatDialog(this, format); 1891 path,
1892 getMainModel()->getSampleRate(),
1893 5);
1892 if (dialog->exec() == QDialog::Accepted) { 1894 if (dialog->exec() == QDialog::Accepted) {
1893 model = DataFileReaderFactory::loadCSV 1895 model = DataFileReaderFactory::loadCSV
1894 (path, dialog->getFormat(), 1896 (path, dialog->getFormat(),
1895 getMainModel()->getSampleRate()); 1897 getMainModel()->getSampleRate());
1896 } 1898 }