remove use of Tempo::active() from GUI

This has not been accessible in the GUI since 7.0.
This commit is contained in:
Paul Davis 2023-09-11 10:07:04 -06:00
parent eca4c83b7b
commit 734a62101f
3 changed files with 5 additions and 25 deletions

View File

@ -3260,16 +3260,10 @@ void
TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor) TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
{ {
Drag::start_grab (event, cursor); Drag::start_grab (event, cursor);
if (!_real_section->active ()) {
show_verbose_cursor_text (_("inactive"));
} else {
show_verbose_cursor_time (adjusted_current_time (event)); show_verbose_cursor_time (adjusted_current_time (event));
/* setup thread-local tempo map ptr as a writable copy */ /* setup thread-local tempo map ptr as a writable copy */
map = _editor->begin_tempo_map_edit (); map = _editor->begin_tempo_map_edit ();
} }
}
void void
TempoMarkerDrag::setup_pointer_offset () TempoMarkerDrag::setup_pointer_offset ()
@ -3280,10 +3274,6 @@ TempoMarkerDrag::setup_pointer_offset ()
void void
TempoMarkerDrag::motion (GdkEvent* event, bool first_move) TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
{ {
if (!_marker->tempo ().active ()) {
return;
}
if (first_move) { if (first_move) {
/* get current state */ /* get current state */
_before_state = &map->get_state (); _before_state = &map->get_state ();
@ -3318,9 +3308,6 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
void void
TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred) TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
{ {
if (!_marker->tempo ().active ()) {
return;
}
if (!movement_occurred) { if (!movement_occurred) {
/* reset the per-thread tempo map ptr back to the current /* reset the per-thread tempo map ptr back to the current

View File

@ -1030,9 +1030,6 @@ Editor::tempo_map_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* i
build_meter_marker_menu (mm, can_remove); build_meter_marker_menu (mm, can_remove);
meter_marker_menu->popup (1, ev->time); meter_marker_menu->popup (1, ev->time);
} else if (tm) { } else if (tm) {
if (!tm->tempo().active()) {
return;
}
can_remove = !tm->tempo().map().is_initial(tm->tempo()) && !tm->tempo().locked_to_meter(); can_remove = !tm->tempo().map().is_initial(tm->tempo()) && !tm->tempo().locked_to_meter();
build_tempo_marker_menu (tm, can_remove); build_tempo_marker_menu (tm, can_remove);
tempo_marker_menu->popup (1, ev->time); tempo_marker_menu->popup (1, ev->time);

View File

@ -280,13 +280,9 @@ Editor::update_tempo_curves (double min_tempo, double max_tempo, samplecnt_t sr)
curve.set_duration (samplecnt_t (UINT32_MAX)); curve.set_duration (samplecnt_t (UINT32_MAX));
} }
if (!tm->tempo().active()) {
curve.hide();
} else {
curve.show(); curve.show();
} }
} }
}
void void
Editor::tempo_map_changed () Editor::tempo_map_changed ()
@ -568,7 +564,7 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item)
abort(); /*NOTREACHED*/ abort(); /*NOTREACHED*/
} }
if (!tempo_marker->tempo().locked_to_meter() && tempo_marker->tempo().active()) { if (!tempo_marker->tempo().locked_to_meter()) {
Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo())); Glib::signal_idle().connect (sigc::bind (sigc::mem_fun(*this, &Editor::real_remove_tempo_marker), &tempo_marker->tempo()));
} }
} }