summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-01-07 01:12:09 +1100
committernick_m <mainsbridge@gmail.com>2017-01-07 01:12:09 +1100
commit4cb00905838ba6ae35317876ae8601a4076745ed (patch)
treeab0973876ce73bdff44d201c795e8f5f42e90748 /gtk2_ardour/editor_tempodisplay.cc
parentbdb8cce6e3dffa283bae18ef993dda13df8070d4 (diff)
fix some inactive tempi bugs
- no tempo curve for inactive tempi - inactive and meter-locked tempi cannot be deleted.
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index e98959ba9d..0d19f7228a 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -141,6 +141,13 @@ Editor::draw_metric_marks (const Metrics& metrics)
(*x)->set_min_tempo (min_tempo);
++tmp;
if (tmp != tempo_curves.end()) {
+
+ if (!(*x)->tempo().active()) {
+ (*x)->hide();
+ } else {
+ (*x)->show();
+ }
+
(*x)->set_position ((*x)->tempo().frame(), (*tmp)->tempo().frame());
} else {
(*x)->set_position ((*x)->tempo().frame(), UINT32_MAX);
@@ -243,6 +250,13 @@ Editor::marker_position_changed ()
(*x)->set_min_tempo (min_tempo);
++tmp;
if (tmp != tempo_curves.end()) {
+
+ if (!(*x)->tempo().active()) {
+ (*x)->hide();
+ } else {
+ (*x)->show();
+ }
+
(*x)->set_position ((*x)->tempo().frame(), (*tmp)->tempo().frame());
} else {
(*x)->set_position ((*x)->tempo().frame(), UINT32_MAX);
@@ -441,7 +455,7 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item)
abort(); /*NOTREACHED*/
}
- if (!tempo_marker->tempo().initial()) {
+ if (!tempo_marker->tempo().locked_to_meter() && tempo_marker->tempo().active()) {
Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo()));
}
}