summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-05-20 06:39:48 +1000
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:16 +1000
commit82d876b48b9de4e178547d00e91e6aa098ae56a7 (patch)
tree61653c2fbc3fce5b6b974f3161263ec2988c6806 /gtk2_ardour/editor_tempodisplay.cc
parent820e9a43f54d9ec4c403492527e2f0a136f76569 (diff)
Tempo ramps - clean up add/replace tempo
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 3058323c5a..adc7247e8b 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -428,15 +428,9 @@ Editor::edit_tempo_section (TempoSection* section)
begin_reversible_command (_("replace tempo mark"));
XMLNode &before = _session->tempo_map().get_state();
- if (tempo_dialog.get_lock_style() == MusicTime) {
- section->set_position_lock_style (MusicTime);
- 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_pulse (*section, Tempo (bpm, nt), p, tempo_dialog.get_tempo_type());
- } else {
- framepos_t const f = _session->tempo_map().predict_tempo_frame (section, when);
- _session->tempo_map().replace_tempo_frame (*section, Tempo (bpm, nt), f, tempo_dialog.get_tempo_type());
- }
+ 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());
XMLNode &after = _session->tempo_map().get_state();
_session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));