diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-28 11:28:38 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-28 11:28:45 -0500 |
commit | 67e415e14ca8cbd07da02d5ac5f82fa8e24d0fea (patch) | |
tree | 242f76a7107bd63615ff38f10a0a588f765c702d /libs/surfaces | |
parent | e25a4371cbc7faca0661bd7d85cef6ab1c2c8e69 (diff) |
make Ben's cool range select hack work with Push 2
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 */ |