diff data/fileio/FileFinder.cpp @ 305:fc656505c573

* Add labelling option for instants inserted through tapping (closes FR#1674184) Needs some refinement still, but it's almost functionally complete
author Chris Cannam
date Mon, 08 Oct 2007 14:44:38 +0000
parents 726b32522e3f
children 3a6725f285d6
line wrap: on
line diff
--- a/data/fileio/FileFinder.cpp	Fri Oct 05 15:52:52 2007 +0000
+++ b/data/fileio/FileFinder.cpp	Mon Oct 08 14:44:38 2007 +0000
@@ -282,8 +282,11 @@
         path = *files.begin();
         
         QFileInfo fi(path);
+
+        std::cerr << "type = " << type << ", suffix = " << fi.suffix().toStdString() << std::endl;
         
-        if (type == LayerFile && fi.suffix() == "") {
+        if ((type == LayerFile || type == LayerFileNoMidi)
+            && fi.suffix() == "") {
             QString expectedExtension;
             QString selectedFilter = dialog.selectedFilter();
             if (selectedFilter.contains(".svl")) {
@@ -295,6 +298,7 @@
             } else if (selectedFilter.contains(".mid")) {
                 expectedExtension = "mid";
             }
+            std::cerr << "expected extension = " << expectedExtension.toStdString() << std::endl;
             if (expectedExtension != "") {
                 path = QString("%1.%2").arg(path).arg(expectedExtension);
                 fi = QFileInfo(path);