comparison data/fileio/DataFileReaderFactory.cpp @ 308:14e0f60435b8

* Make it possible to drop audio files, layer files, session files and images onto SV panes. Need to do a bit more work on where we expect the dropped file to go, particularly in the case of audio files -- at the moment they're always opened in new panes, but it may be better to by default replace whatever is in the target pane.
author Chris Cannam
date Wed, 10 Oct 2007 15:18:02 +0000
parents 4b2ea82fd0ed
children 183ee2a55fc7
comparison
equal deleted inserted replaced
307:b1a3f7bc035d 308:14e0f60435b8
51 DataFileReaderFactory::load(QString path, size_t mainModelSampleRate) 51 DataFileReaderFactory::load(QString path, size_t mainModelSampleRate)
52 { 52 {
53 DataFileReader *reader = createReader(path, mainModelSampleRate); 53 DataFileReader *reader = createReader(path, mainModelSampleRate);
54 if (!reader) return NULL; 54 if (!reader) return NULL;
55 55
56 Model *model = reader->load(); 56 try {
57 delete reader; 57 Model *model = reader->load();
58 58 delete reader;
59 return model; 59 return model;
60 } catch (Exception) {
61 delete reader;
62 throw;
63 }
60 } 64 }
61 65