Compare commits

...

2 Commits

Author SHA1 Message Date
Ben Loftis c1fe193def tempo mapping: handle the special case of trying to ramp the 'first' marker 2023-05-22 15:51:38 -05:00
Ben Loftis cc630c6bbe tempo mapping: clicking on a bar line should always make a new tempo marker
* the process of tempo mapping requires/encourages you to click on the
   last-known good marker, before continuing to make tempo tweaks

* this conflicts with the idea that clicking in a ruler should start a
    playhead-drag.  TBD.   but tempo-mapping is a special and rare operation.
2023-05-22 15:51:33 -05:00
2 changed files with 8 additions and 9 deletions

View File

@ -3626,15 +3626,6 @@ MappingTwistDrag::motion (GdkEvent* event, bool first_move)
void
MappingTwistDrag::finished (GdkEvent* event, bool movement_occurred)
{
if (!movement_occurred) {
/* click, no drag */
_editor->abort_tempo_mapping ();
_editor->abort_reversible_command ();
_editor->session ()->request_locate (grab_sample (), false, _was_rolling ? MustRoll : RollIfAppropriate);
return;
}
if (!_drag_valid) {
_editor->abort_tempo_mapping ();
_editor->abort_reversible_command ();

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 */
}
}