diff options
Diffstat (limited to 'libs/surfaces/mackie/mackie_control_protocol.cc')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 4a9121bb71..1ed4dac038 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1095,10 +1095,28 @@ void MackieControlProtocol::poll_automation() LedState MackieControlProtocol::frm_left_press( Button & button ) { // can use first_mark_before/after as well + unsigned long elapsed = _frm_left_last.restart(); + Location * loc = session->locations()->first_location_before ( session->transport_frame() ); - if ( loc != 0 ) session->request_locate( loc->start(), session->transport_rolling() ); + + // allow a quick double to go past a previous mark + if ( elapsed < 500 && loc != 0) + { + Location * loc_two_back = session->locations()->first_location_before ( loc->start() ); + if ( loc_two_back != 0 ) + { + loc = loc_two_back; + } + } + + // move to the location, if it's valid + if ( loc != 0 ) + { + session->request_locate( loc->start(), session->transport_rolling() ); + } + return on; } |