make Ben's cool range select hack work with Push 2

This commit is contained in:
Paul Davis 2016-09-28 11:28:38 -05:00
parent e25a4371cb
commit 67e415e14c
3 changed files with 14 additions and 0 deletions

View file

@ -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 {

View file

@ -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 ();

View file

@ -599,6 +599,8 @@ class Push2 : public ARDOUR::ControlProtocol
uint8_t selection_color;
uint8_t contrast_color;
bool in_range_select;
};
} /* namespace */