diff options
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/push2/buttons.cc | 11 | ||||
-rw-r--r-- | libs/surfaces/push2/push2.cc | 1 | ||||
-rw-r--r-- | libs/surfaces/push2/push2.h | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc index 43e4255f01..097e3debb5 100644 --- a/libs/surfaces/push2/buttons.cc +++ b/libs/surfaces/push2/buttons.cc @@ -364,6 +364,17 @@ Push2::button_play () return; } + if (_modifier_state & ModSelect) { + if (in_range_select) { + in_range_select = true; + access_action ("Editor/start-range-from-playhead"); + } else { + access_action ("Editor/finish-range-from-playhead"); + in_range_select = false; + } + return; + } + if (session->transport_rolling ()) { transport_stop (); } else { diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc index 57160abee3..eb39562153 100644 --- a/libs/surfaces/push2/push2.cc +++ b/libs/surfaces/push2/push2.cc @@ -104,6 +104,7 @@ Push2::Push2 (ARDOUR::Session& s) , _pressure_mode (AfterTouch) , selection_color (LED::Green) , contrast_color (LED::Green) + , in_range_select (false) { build_maps (); diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h index 2d4f17417e..ab98b92445 100644 --- a/libs/surfaces/push2/push2.h +++ b/libs/surfaces/push2/push2.h @@ -599,6 +599,8 @@ class Push2 : public ARDOUR::ControlProtocol uint8_t selection_color; uint8_t contrast_color; + + bool in_range_select; }; } /* namespace */ |