# HG changeset patch # User Chris Cannam # Date 1229095209 0 # Node ID 75c32cc2814a2f2f9543e8b8877dd411e07aaaa5 # Parent 975f6b6c414c5f9b6332910ec1cd8f5b5abac3b0 * Attempt to be a bit more useful when dropping multiple files on window diff -r 975f6b6c414c -r 75c32cc2814a main/MainWindow.cpp --- a/main/MainWindow.cpp Fri Dec 05 18:45:49 2008 +0000 +++ b/main/MainWindow.cpp Fri Dec 12 15:20:09 2008 +0000 @@ -2571,16 +2571,26 @@ for (QStringList::iterator i = uriList.begin(); i != uriList.end(); ++i) { - FileOpenStatus status = open(*i, ReplaceCurrentPane); + FileOpenStatus status; + + if (i == uriList.begin()) { + status = open(*i, ReplaceCurrentPane); + } else { + status = open(*i, CreateAdditionalModel); + } if (status == FileOpenFailed) { emit hideSplash(); QMessageBox::critical(this, tr("Failed to open dropped URL"), tr("Open failed
Dropped URL \"%1\" could not be opened").arg(*i)); + break; } else if (status == FileOpenWrongMode) { emit hideSplash(); QMessageBox::critical(this, tr("Failed to open dropped URL"), tr("Audio required
Unable to load layer data from \"%1\" without an audio file.
Please load at least one audio file before importing annotations.").arg(*i));
+ break;
+ } else if (status == FileOpenCancelled) {
+ break;
}
}
}