mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
Check for cancel at the top of the main loop in Session::import_audiofile rather than using goto
git-svn-id: svn://localhost/ardour2/trunk@2672 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7bddf6208f
commit
03d3147d32
1 changed files with 4 additions and 6 deletions
|
|
@ -164,8 +164,10 @@ Session::import_audiofile (import_status& status)
|
|||
|
||||
status.sources.clear ();
|
||||
|
||||
for (vector<Glib::ustring>::iterator p = status.paths.begin(); p != status.paths.end(); ++p, ++cnt) {
|
||||
|
||||
for (vector<Glib::ustring>::iterator p = status.paths.begin();
|
||||
p != status.paths.end() && !status.cancel;
|
||||
++p, ++cnt)
|
||||
{
|
||||
std::auto_ptr<ImportableSource> source;
|
||||
|
||||
try
|
||||
|
|
@ -229,10 +231,6 @@ Session::import_audiofile (import_status& status)
|
|||
}
|
||||
|
||||
std::copy (newfiles.begin(), newfiles.end(), std::back_inserter(status.sources));
|
||||
|
||||
if (status.cancel) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!status.cancel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue