From c1fe193deff992ac2a85a9b72d97fd59edb875ab Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Mon, 22 May 2023 15:50:19 -0500 Subject: [PATCH] tempo mapping: handle the special case of trying to ramp the 'first' marker --- gtk2_ardour/editor_mouse.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 02ddd7addf..29d7f9a2dc 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -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 */ } }