diff options
author | Carl Hetherington <carl@carlh.net> | 2009-08-02 00:32:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-08-02 00:32:26 +0000 |
commit | e481963920911afa653e3cce3cdb2cd3a4c4c046 (patch) | |
tree | df970c73ea91a9fb3af81f5aa2aefee0d775c0f5 /libs/ardour/import.cc | |
parent | 7ed2058e3ef4fffaed961b43f2e75e1bdad82af5 (diff) |
Fix import dialog so that file number progress gets updated correctly. Stop a new progress dialog being popped up for each file.
git-svn-id: svn://localhost/ardour2/branches/3.0@5451 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/import.cc')
-rw-r--r-- | libs/ardour/import.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 02c5481ece..735127e588 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -395,7 +395,7 @@ Session::import_audiofiles (ImportStatus& status) uint channels = 0; status.sources.clear (); - + for (vector<Glib::ustring>::iterator p = status.paths.begin(); p != status.paths.end() && !status.cancel; ++p, ++cnt) @@ -404,7 +404,7 @@ Session::import_audiofiles (ImportStatus& status) std::auto_ptr<Evoral::SMF> smf_reader; const DataType type = ((*p).rfind(".mid") != string::npos) ? DataType::MIDI : DataType::AUDIO; - + if (type == DataType::AUDIO) { try { source = open_importable_source (*p, frame_rate(), status.quality); @@ -442,7 +442,9 @@ Session::import_audiofiles (ImportStatus& status) // copy on cancel/failure so that any files that were created will be removed below std::copy (newfiles.begin(), newfiles.end(), std::back_inserter(all_new_sources)); - if (status.cancel) break; + if (status.cancel) { + break; + } for (Sources::iterator i = newfiles.begin(); i != newfiles.end(); ++i) { if ((afs = boost::dynamic_pointer_cast<AudioFileSource>(*i)) != 0) { |