diff options
author | Ben Loftis <ben@glw.com> | 2009-06-10 12:51:37 +0000 |
---|---|---|
committer | Ben Loftis <ben@glw.com> | 2009-06-10 12:51:37 +0000 |
commit | adb94a0d9e2d16dd0eb632d89b05cd89a4c24e11 (patch) | |
tree | bfe1e2b33f3fa75e8f37cfd467e373da6c925305 /gtk2_ardour | |
parent | 9c8ecfd3bb241d3a0a00a72f0bb76fce23076a4a (diff) |
Allow Insert Time option to move tempos and time sig changes, as per #1951 (thanks carlh)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5150 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 9d661c8125..f3ed303fc2 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1098,7 +1098,7 @@ class Editor : public PublicEditor void adjust_region_scale_amplitude (bool up); void do_insert_time (); - void insert_time (nframes64_t pos, nframes64_t distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too); + void insert_time (nframes64_t pos, nframes64_t distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too, bool tempo_too); void tab_to_transient (bool forward); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 40e1b22aed..3c19d69a30 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -6000,6 +6000,7 @@ Editor::do_insert_time () Label intersect_option_label (_("Intersected regions should:")); CheckButton glue_button (_("Move Glued Regions")); CheckButton marker_button (_("Move Markers")); + CheckButton tempo_button (_("Move Tempo & Meters")); AudioClock clock ("insertTimeClock", true, X_("InsertTimeClock"), true, true, true); HBox clock_box; @@ -6014,6 +6015,7 @@ Editor::do_insert_time () option_box.pack_start (button_box, false, false); option_box.pack_start (glue_button, false, false); option_box.pack_start (marker_button, false, false); + option_box.pack_start (tempo_button, false, false); button_box.pack_start (leave_button, false, false); button_box.pack_start (move_button, false, false); @@ -6033,6 +6035,7 @@ Editor::do_insert_time () clock.show_all(); clock_box.show (); marker_button.show (); + tempo_button.show (); d.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); d.add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); @@ -6060,12 +6063,12 @@ Editor::do_insert_time () opt = SplitIntersected; } - insert_time (pos, distance, opt, glue_button.get_active(), marker_button.get_active()); + insert_time (pos, distance, opt, glue_button.get_active(), marker_button.get_active(), tempo_button.get_active()); } void Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt, - bool ignore_music_glue, bool markers_too) + bool ignore_music_glue, bool markers_too, bool tempo_too) { bool commit = false; @@ -6127,6 +6130,9 @@ Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt, session->add_command (new MementoCommand<Locations>(*session->locations(), &before, &after)); } } + + if (tempo_too) + session->tempo_map().insert_time (pos, frames); if (commit) { commit_reversible_command (); |