# HG changeset patch # User Chris Cannam # Date 1221741210 0 # Node ID b742f579ced03467fd8c4e3f876899d73408ad97 # Parent b6dfdd99bd60be64f0b03c1d21b6715744d8dd50 * Merge revisions 1131 to 1201 from sv-rdf-import branch diff -r b6dfdd99bd60 -r b742f579ced0 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Thu Sep 18 12:09:32 2008 +0000 +++ b/framework/MainWindowBase.cpp Thu Sep 18 12:33:30 2008 +0000 @@ -1064,6 +1064,8 @@ MainWindowBase::FileOpenStatus MainWindowBase::openPlaylist(FileSource source, AudioFileOpenMode mode) { + std::cerr << "MainWindowBase::openPlaylist(" << source.getLocation().toStdString() << ")" << std::endl; + std::set extensions; PlaylistFileReader::getSupportedExtensions(extensions); QString extension = source.getExtension(); @@ -1103,6 +1105,8 @@ MainWindowBase::FileOpenStatus MainWindowBase::openLayer(FileSource source) { + std::cerr << "MainWindowBase::openLayer(" << source.getLocation().toStdString() << ")" << std::endl; + Pane *pane = m_paneStack->getCurrentPane(); if (!pane) { @@ -1128,9 +1132,17 @@ RDFImporter importer("file://" + path, getMainModel()->getSampleRate()); if (importer.isOK()) { - ProgressDialog dialog(tr("Importing from RDF..."), true, 2000, this); - connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash())); - std::vector models = importer.getDataModels(&dialog); + std::vector models; + + { + ProgressDialog dialog(tr("Importing from RDF..."), true, 2000, this); + connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash())); + models = importer.getDataModels(&dialog); + } + + if (models.empty()) { + return FileOpenFailed; + } for (int i = 0; i < models.size(); ++i) { Layer *newLayer = m_document->createImportedLayer(models[i]); @@ -1239,6 +1251,8 @@ MainWindowBase::FileOpenStatus MainWindowBase::openImage(FileSource source) { + std::cerr << "MainWindowBase::openImage(" << source.getLocation().toStdString() << ")" << std::endl; + Pane *pane = m_paneStack->getCurrentPane(); if (!pane) { @@ -1297,6 +1311,8 @@ MainWindowBase::FileOpenStatus MainWindowBase::openSession(FileSource source) { + std::cerr << "MainWindowBase::openSession(" << source.getLocation().toStdString() << ")" << std::endl; + if (!source.isAvailable()) return FileOpenFailed; if (source.getExtension() != "sv") return FileOpenFailed; source.waitForData();