tempo mapping: handle the special case of trying to ramp the 'first' marker

This commit is contained in:
Ben Loftis 2023-05-22 15:50:19 -05:00
parent cc630c6bbe
commit c1fe193def
1 changed files with 8 additions and 0 deletions

View File

@ -3060,5 +3060,13 @@ Editor::choose_mapping_drag (ArdourCanvas::Item* item, GdkEvent* event)
std::cerr << "TWIST\n";
begin_reversible_command (_("tempo mapping: mid-twist"));
_drags->set (new MappingTwistDrag (this, item, map, *before, *focus, *after, *before_state, ramped), event);
} else if (ramped && focus && after) {
/* special case 4: user is manipulating a beat line after the INITIAL tempo marker, so there is no prior marker*/
std::cerr << "TWIST ON START\n";
begin_reversible_command (_("tempo mapping: mid-twist"));
before = focus; /* this is unused in MappingTwistDrag, when ramped is true, but let's not pass in garbage */
_drags->set (new MappingTwistDrag (this, item, map, *before, *focus, *after, *before_state, ramped), event);
} else {
abort_tempo_mapping (); /* NOTREACHED */
}
}