diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-12-21 14:48:25 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-12-21 14:48:25 +0000 |
commit | 2315c433e276110d8c1ac7cc5c8935c31b6f5879 (patch) | |
tree | e588fa9f1be957f6e9995c142b94911718378ff9 /gtk2_ardour/editor_tempodisplay.cc | |
parent | 1fca71fd283c912bbb0d88fcb95fb8e3b330c09e (diff) |
new tempo handling from drmoore; don't follow playhead when doing requested_return stuff; if selected marker is end of range, do the right thing when computing edit point
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2806 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 854f670121..26363b9997 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -308,13 +308,14 @@ Editor::mouse_add_new_tempo_event (nframes_t frame) BBT_Time requested; bpm = tempo_dialog.get_bpm (); + double nt = tempo_dialog.get_note_type(); bpm = max (0.01, bpm); tempo_dialog.get_bbt_time (requested); begin_reversible_command (_("add tempo mark")); XMLNode &before = map.get_state(); - map.add_tempo (Tempo (bpm), requested); + map.add_tempo (Tempo (bpm,nt), requested); XMLNode &after = map.get_state(); session->add_command(new MementoCommand<TempoMap>(map, &before, &after)); commit_reversible_command (); @@ -429,13 +430,14 @@ Editor::edit_tempo_section (TempoSection* section) } double bpm = tempo_dialog.get_bpm (); + double nt = tempo_dialog.get_note_type (); BBT_Time when; tempo_dialog.get_bbt_time(when); bpm = max (0.01, bpm); begin_reversible_command (_("replace tempo mark")); XMLNode &before = session->tempo_map().get_state(); - session->tempo_map().replace_tempo (*section, Tempo (bpm)); + session->tempo_map().replace_tempo (*section, Tempo (bpm,nt)); session->tempo_map().move_tempo (*section, when); XMLNode &after = session->tempo_map().get_state(); session->add_command (new MementoCommand<TempoMap>(session->tempo_map(), &before, &after)); |