do not use a write copy of the tempo map when not planning to modify the map

This commit is contained in:
Paul Davis 2022-02-20 09:31:23 -07:00
parent b9de15d285
commit 685a3ebc7e
1 changed files with 2 additions and 2 deletions

View File

@ -4240,7 +4240,7 @@ Editor::bounce_range_selection (BounceTarget target, bool enable_processing)
timecnt_t cnt = start.distance (end);
bool in_command = false;
TempoMap::SharedPtr tmap (TempoMap::write_copy());
TempoMap::SharedPtr tmap (TempoMap::use());
double tempo = tmap->tempo_at(start).quarter_notes_per_minute();
for (TrackViewList::iterator i = views.begin(); i != views.end(); ++i) {
@ -7211,7 +7211,7 @@ Editor::define_one_bar (timepos_t const & start, timepos_t const & end)
{
timecnt_t length = start.distance (end);
TempoMap::SharedPtr tmap (TempoMap::write_copy());
TempoMap::SharedPtr tmap (TempoMap::use());
const Meter& m (tmap->meter_at (start));
/* length = 1 bar */