diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index e21d2efe3e..c2351c74fc 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -447,11 +447,17 @@ Editor::do_embed (vector paths, ImportDisposition chns, ImportMode mode, vector to_embed; bool multi = paths.size() > 1; int nth = 0; + bool use_timestamp = (pos == -1); switch (chns) { case Editing::ImportDistinctFiles: for (vector::iterator a = paths.begin(); a != paths.end(); ++a) { + /* have to reset this for every file we handle */ + if (use_timestamp) { + pos = -1; + } + to_embed.clear (); to_embed.push_back (*a); @@ -468,6 +474,11 @@ Editor::do_embed (vector paths, ImportDisposition chns, ImportMode mode, case Editing::ImportDistinctChannels: for (vector::iterator a = paths.begin(); a != paths.end(); ++a) { + /* have to reset this for every file we handle */ + if (use_timestamp) { + pos = -1; + } + to_embed.clear (); to_embed.push_back (*a); @@ -486,6 +497,11 @@ Editor::do_embed (vector paths, ImportDisposition chns, ImportMode mode, case Editing::ImportSerializeFiles: for (vector::iterator a = paths.begin(); a != paths.end(); ++a) { + /* have to reset this for every file we handle */ + if (use_timestamp) { + pos = -1; + } + to_embed.clear (); to_embed.push_back (*a);