summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-04-14 06:03:20 +1000
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:15 +1000
commit932c7b07fd42fa383d772b6cb4543893ed9ea7f7 (patch)
tree9262a0213c3e6ea9fc176f7edf1b743fd681185e /gtk2_ardour/editor_tempodisplay.cc
parentb6afce717335c23ba39abbfbe90f8dd44d96d7e0 (diff)
Tempo ramps - adding a new tempo doesn't involve a dialog.
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc26
1 files changed, 3 insertions, 23 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index fecdeb0ecb..4f12aadb0a 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -223,32 +223,12 @@ Editor::mouse_add_new_tempo_event (framepos_t frame)
}
TempoMap& map(_session->tempo_map());
- TempoDialog tempo_dialog (map, frame, _("add"));
- //this causes compiz to display no border.
- //tempo_dialog.signal_realize().connect (sigc::bind (sigc::ptr_fun (set_decoration), &tempo_dialog, Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH)));
-
- switch (tempo_dialog.run()) {
- case RESPONSE_ACCEPT:
- break;
- default:
- return;
- }
-
- double bpm = 0;
- Timecode::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();
- if (tempo_dialog.get_lock_style() == MusicTime) {
- map.add_tempo (Tempo (bpm,nt), map.pulse_at_beat (map.bbt_to_beats (requested)), tempo_dialog.get_tempo_type());
- } else {
- map.add_tempo (Tempo (bpm,nt), frame, tempo_dialog.get_tempo_type());
- }
+ /* add music-locked ramped (?) tempo using the bpm/note type at frame*/
+ map.add_tempo (map.tempo_at (frame), map.pulse_at_frame (frame), TempoSection::Ramp);
+
XMLNode &after = map.get_state();
_session->add_command(new MementoCommand<TempoMap>(map, &before, &after));
commit_reversible_command ();