summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-06-08 23:24:14 +0000
committerCarl Hetherington <carl@carlh.net>2009-06-08 23:24:14 +0000
commit41c5bff44265579da83f05bab6a72651e4f84de9 (patch)
tree78dada08b3828cd798ed9345535e1399c827d082 /gtk2_ardour
parentbf5111c90de3bac2e73a930a1b4c77b719e5c740 (diff)
Allow Insert Time option to move tempos and time sig changes, as per #1951.
git-svn-id: svn://localhost/ardour2/branches/3.0@5132 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_ops.cc10
2 files changed, 9 insertions, 3 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 2a28d0fe1b..2528f2054b 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1172,7 +1172,7 @@ class Editor : public PublicEditor
void quantize_region ();
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, nframes64_t, Editing::InsertTimeOption, bool, bool, bool);
void tab_to_transient (bool forward);
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 4244567304..5dac7820fb 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -6218,6 +6218,8 @@ Editor::do_insert_time ()
d.get_vbox()->pack_start (move_glued);
CheckButton move_markers (_("Move markers"));
d.get_vbox()->pack_start (move_markers);
+ CheckButton move_tempos (_("Move tempo and meter changes"));
+ d.get_vbox()->pack_start (move_tempos);
d.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
d.add_button (_("Insert time"), Gtk::RESPONSE_OK);
@@ -6249,12 +6251,12 @@ Editor::do_insert_time ()
break;
}
- insert_time (pos, distance, opt, move_glued.get_active(), move_markers.get_active());
+ insert_time (pos, distance, opt, move_glued.get_active(), move_markers.get_active(), move_tempos.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;
@@ -6317,6 +6319,10 @@ Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
}
}
+ if (tempo_too) {
+ session->tempo_map().insert_time (pos, frames);
+ }
+
if (commit) {
commit_reversible_command ();
}