diff options
author | nick_m <mainsbridge@gmail.com> | 2016-07-05 01:11:48 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-07-10 02:18:38 +1000 |
commit | 99653ae2cadf1f082d03ff7577636ac0b79deca3 (patch) | |
tree | 2f14576b48fe3a9b8dab5c4ddecef55cb61123eb /gtk2_ardour/editor_tempodisplay.cc | |
parent | 33dab757ee720cb77c7a39179efecc731b4d3fb2 (diff) |
Simplify Editor::mouse_add_new_meter_event() a bit.
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 6c009b66e2..ba73a01f0b 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -353,17 +353,19 @@ Editor::mouse_add_new_meter_event (framepos_t frame) bpb = max (1.0, bpb); // XXX is this a reasonable limit? double note_type = meter_dialog.get_note_type (); - Timecode::BBT_Time requested; + Timecode::BBT_Time requested; meter_dialog.get_bbt_time (requested); + const double beat = map.beat_at_bbt (requested); + begin_reversible_command (_("add meter mark")); XMLNode &before = map.get_state(); if (meter_dialog.get_lock_style() == MusicTime) { - map.add_meter (Meter (bpb, note_type), map.beat_at_bbt (requested), requested, map.frame_at_bbt (requested), MusicTime); + map.add_meter (Meter (bpb, note_type), beat, requested, map.frame_at_beat (beat), MusicTime); } else { - map.add_meter (Meter (bpb, note_type), map.beat_at_bbt (requested), requested, map.frame_at_bbt (requested), AudioTime); + map.add_meter (Meter (bpb, note_type), beat, requested, map.frame_at_beat (beat), AudioTime); } _session->add_command(new MementoCommand<TempoMap>(map, &before, &map.get_state())); |