From 6e12e71e8be1d931f6bcda10da3ca2c08fed4008 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 24 Feb 2024 00:41:42 +0100 Subject: [PATCH] Show Progress when importing many channels/tracks Track creation is a slow. Importing multi-channel files to new tracks can take a significant amount of time. This prevents the GUI from being marked as unresponsive and shows progress. --- gtk2_ardour/editor_audio_import.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index a13455cb65..e9f6fde871 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -1005,6 +1005,13 @@ Editor::add_sources (vector paths, } } + if (track_names.size() > 2 && current_interthread_info) { + import_status.current = n; + import_status.total = track_names.size (); + import_status.progress = 0.5; + import_status.doing_what = "Creating Tracks"; + ARDOUR::GUIIdle (); + } finish_bringing_in_material (*r, input_chan, output_chan, pos, mode, track, track_names[n], pgroup_id, instrument); rlen = (*r)->length();