diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-28 21:02:31 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-28 21:02:31 +0000 |
commit | a85e0b0a2edc2df28a9ece5742a97c9790bf45d1 (patch) | |
tree | cbf4b0e5f11c95cf2ee52517540cdb49e04f0fe2 /gtk2_ardour/editor_tempodisplay.cc | |
parent | c3a52084f8ca0dc93daaf81efb726d051ed47bf6 (diff) |
a huge set of changes to tempo+meter handling. testing feedback requested. the_CLA, you know who i mean :)
git-svn-id: svn://localhost/ardour2/branches/3.0@11103 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r-- | gtk2_ardour/editor_tempodisplay.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 5f9293d4e2..89832c5d13 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -330,9 +330,12 @@ Editor::edit_meter_section (MeterSection* section) double note_type = meter_dialog.get_note_type (); + Timecode::BBT_Time when; + meter_dialog.get_bbt_time(when); + begin_reversible_command (_("replace tempo mark")); XMLNode &before = _session->tempo_map().get_state(); - _session->tempo_map().replace_meter (*section, Meter (bpb, note_type)); + _session->tempo_map().replace_meter (*section, Meter (bpb, note_type), when); XMLNode &after = _session->tempo_map().get_state(); _session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); commit_reversible_command (); @@ -360,14 +363,9 @@ Editor::edit_tempo_section (TempoSection* section) tempo_dialog.get_bbt_time(when); bpm = max (0.01, bpm); - cerr << "Editing tempo section to be at " << when << endl; - _session->tempo_map().dump (cerr); begin_reversible_command (_("replace tempo mark")); XMLNode &before = _session->tempo_map().get_state(); - _session->tempo_map().replace_tempo (*section, Tempo (bpm,nt)); - _session->tempo_map().dump (cerr); - _session->tempo_map().move_tempo (*section, when); - _session->tempo_map().dump (cerr); + _session->tempo_map().replace_tempo (*section, Tempo (bpm, nt), when); XMLNode &after = _session->tempo_map().get_state(); _session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); commit_reversible_command (); @@ -416,7 +414,7 @@ Editor::real_remove_tempo_marker (TempoSection *section) { begin_reversible_command (_("remove tempo mark")); XMLNode &before = _session->tempo_map().get_state(); - _session->tempo_map().remove_tempo (*section); + _session->tempo_map().remove_tempo (*section, true); XMLNode &after = _session->tempo_map().get_state(); _session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); commit_reversible_command (); @@ -450,7 +448,7 @@ Editor::real_remove_meter_marker (MeterSection *section) { begin_reversible_command (_("remove tempo mark")); XMLNode &before = _session->tempo_map().get_state(); - _session->tempo_map().remove_meter (*section); + _session->tempo_map().remove_meter (*section, true); XMLNode &after = _session->tempo_map().get_state(); _session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after)); commit_reversible_command (); |