From 6af9dffa7cff308dc77aa03cfc9ae75068ab0300 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 22 Nov 2022 01:46:22 +0100 Subject: [PATCH] Remove UI code to import markers as locations (3/4) --- gtk2_ardour/editor.h | 1 - gtk2_ardour/editor_audio_import.cc | 30 +----------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 712f8860e1..75950945bd 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1541,7 +1541,6 @@ private: void import_audio (bool as_tracks); void do_import (std::vector paths, bool split, bool as_tracks); void import_smf_tempo_map (Evoral::SMF const &, Temporal::timepos_t const & pos); - void import_smf_markers (Evoral::SMF &, Temporal::timepos_t const & pos); void move_to_start (); void move_to_end (); void center_playhead (); diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 4fb04f8b79..5827f64d20 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -333,29 +333,6 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, timepos_t const & pos) tmc.use_new_map (new_map); } -void -Editor::import_smf_markers (Evoral::SMF & smf, timepos_t const & pos) -{ - if (!_session) { - return; - } - - smf.load_markers (); - - Evoral::SMF::Markers const & markers = smf.markers(); - - if (markers.empty()) { - return; - } - - for (Evoral::SMF::Markers::const_iterator m = markers.begin(); m != markers.end(); ++m) { - Beats beats = Beats::from_double (m->time_pulses / (double) smf.ppqn()); - Location* loc = new Location (*_session, timepos_t (beats), timepos_t (Temporal::BeatTime), m->text, Location::IsMark); - _session->locations()->add (loc); - } - -} - void Editor::do_import (vector paths, ImportDisposition disposition, @@ -383,7 +360,7 @@ Editor::do_import (vector paths, in the wrong position. */ - if (with_markers || (smf_tempo_disposition == SMFTempoUse)) { + if (smf_tempo_disposition == SMFTempoUse) { bool tempo_map_done = false; @@ -405,11 +382,6 @@ Editor::do_import (vector paths, } } - if (with_markers) { - - import_smf_markers (smf, pos); - } - smf.close (); } }