Remove UI code to import markers as locations (3/4)
This commit is contained in:
parent
c8711aacc6
commit
6af9dffa7c
|
@ -1541,7 +1541,6 @@ private:
|
|||
void import_audio (bool as_tracks);
|
||||
void do_import (std::vector<std::string> 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 ();
|
||||
|
|
|
@ -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<string> paths,
|
||||
ImportDisposition disposition,
|
||||
|
@ -383,7 +360,7 @@ Editor::do_import (vector<string> 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<string> paths,
|
|||
}
|
||||
}
|
||||
|
||||
if (with_markers) {
|
||||
|
||||
import_smf_markers (smf, pos);
|
||||
}
|
||||
|
||||
smf.close ();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user