diff options
author | nick_m <mainsbridge@gmail.com> | 2016-05-21 04:48:42 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:17 +1000 |
commit | d1a075110afa8efe1944ba7a9a2ba6be985c8291 (patch) | |
tree | 1d39b3d80e15e727e352001d1622eb4ace68742e /gtk2_ardour/editor_tempodisplay.cc | |
parent | 6894f468d4e5fcd6624368f7a7f820a9fcaa4455 (diff) |
Tempo ramps - more code cleanup, fix cross-marker jumping using tempo dialog bbt
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index ad9551b87f..e2540ddfd0 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -425,9 +425,13 @@ Editor::edit_tempo_section (TempoSection* section) begin_reversible_command (_("replace tempo mark")); XMLNode &before = _session->tempo_map().get_state(); - framepos_t const f = _session->tempo_map().predict_tempo_frame (section, when); - double const p = _session->tempo_map().predict_tempo_pulse (section, f); - _session->tempo_map().replace_tempo (*section, Tempo (bpm, nt), p, f, tempo_dialog.get_tempo_type(), tempo_dialog.get_lock_style()); + if (tempo_dialog.get_lock_style() == AudioTime) { + framepos_t const f = _session->tempo_map().predict_tempo_frame (section, when); + _session->tempo_map().replace_tempo (*section, Tempo (bpm, nt), 0.0, f, tempo_dialog.get_tempo_type(), AudioTime); + } else { + double const p = _session->tempo_map().predict_tempo_pulse (section, when); + _session->tempo_map().replace_tempo (*section, Tempo (bpm, nt), p, 0, tempo_dialog.get_tempo_type(), MusicTime); + } XMLNode &after = _session->tempo_map().get_state(); _session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); |