13
0

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,15 +3260,9 @@ void
TempoMarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
{
Drag::start_grab (event, cursor);
if (!_real_section->active ()) {
show_verbose_cursor_text (_("inactive"));
} else {
show_verbose_cursor_time (adjusted_current_time (event));
/* setup thread-local tempo map ptr as a writable copy */
map = _editor->begin_tempo_map_edit ();
}
show_verbose_cursor_time (adjusted_current_time (event));
/* setup thread-local tempo map ptr as a writable copy */
map = _editor->begin_tempo_map_edit ();
}
void
@ -3280,10 +3274,6 @@ TempoMarkerDrag::setup_pointer_offset ()
void
TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
{
if (!_marker->tempo ().active ()) {
return;
}
if (first_move) {
/* get current state */
_before_state = &map->get_state ();
@ -3318,9 +3308,6 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
void
TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred)
{
if (!_marker->tempo ().active ()) {
return;
}
if (!movement_occurred) {
/* 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);
meter_marker_menu->popup (1, ev->time);
} else if (tm) {
if (!tm->tempo().active()) {
return;
}
can_remove = !tm->tempo().map().is_initial(tm->tempo()) && !tm->tempo().locked_to_meter();
build_tempo_marker_menu (tm, can_remove);
tempo_marker_menu->popup (1, ev->time);

View File

@ -280,11 +280,7 @@ Editor::update_tempo_curves (double min_tempo, double max_tempo, samplecnt_t sr)
curve.set_duration (samplecnt_t (UINT32_MAX));
}
if (!tm->tempo().active()) {
curve.hide();
} else {
curve.show();
}
curve.show();
}
}
@ -568,7 +564,7 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item)
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()));
}
}