13
0

Block periodic saves while importing

Resampling or copying files during import can take a long time.
If a save, or pending save is called while importing,
it is postponed until after import has completed.
This commit is contained in:
Robin Gareus 2020-05-19 18:30:04 +02:00
parent 272d095af6
commit 5b1a8f79bc
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -540,7 +540,8 @@ Editor::import_sndfiles (vector<string> paths,
bool replace,
ARDOUR::PluginInfoPtr instrument)
{
cerr << "Importing " << paths.size() << " at once\n";
/* skip periodic saves while importing */
Session::StateProtector sp (_session);
import_status.paths = paths;
import_status.done = false;
@ -615,6 +616,9 @@ Editor::embed_sndfiles (vector<string> paths,
string linked_path;
SoundFileInfo finfo;
/* skip periodic saves while importing */
Session::StateProtector sp (_session);
CursorContext::Handle cursor_ctx = CursorContext::create(*this, _cursors->wait);
gdk_flush ();