when importing SMF tempo map, use actual imported map duration

using timepos_t::max (AudioTime) leads to overflows in the beat time
domain, and then screws up details of TempoMap::paste()
This commit is contained in:
Paul Davis 2025-08-05 11:36:21 -06:00
parent 60d8e1b817
commit 389096b83b

View file

@ -289,7 +289,7 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, timepos_t const & pos)
TempoMapCutBuffer* tmcb;
// XMLNode& tm_before (wmap->get_state());
tmcb = new_map->copy (timepos_t (0), timepos_t::max (Temporal::AudioTime));
tmcb = new_map->copy (timepos_t::zero (Temporal::AudioTime), timepos_t::from_superclock (new_map->duration(Temporal::AudioTime).superclocks()));
if (tmcb && !tmcb->empty()) {
wmap->paste (*tmcb, pos, false, _("import"));