diff options
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r-- | gtk2_ardour/editor_markers.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 74e35a246b..9664d6f65f 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -1426,9 +1426,12 @@ Editor::toggle_tempo_type () begin_reversible_command (_("change tempo type")); XMLNode &before = _session->tempo_map().get_state(); TempoSection* tsp = &tm->tempo(); - _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()) - , (tsp->position_lock_style() == MusicTime) ? tsp->pulse() : tsp->frame() - , (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp); + if (tsp->position_lock_style() == AudioTime) { + _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->frame(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp); + } else { + _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->pulse(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp); + } + XMLNode &after = _session->tempo_map().get_state(); _session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); commit_reversible_command (); |