mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
make Ben's cool range select hack work with Push 2
This commit is contained in:
parent
e25a4371cb
commit
67e415e14c
3 changed files with 14 additions and 0 deletions
|
|
@ -364,6 +364,17 @@ Push2::button_play ()
|
||||||
return;
|
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 ()) {
|
if (session->transport_rolling ()) {
|
||||||
transport_stop ();
|
transport_stop ();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ Push2::Push2 (ARDOUR::Session& s)
|
||||||
, _pressure_mode (AfterTouch)
|
, _pressure_mode (AfterTouch)
|
||||||
, selection_color (LED::Green)
|
, selection_color (LED::Green)
|
||||||
, contrast_color (LED::Green)
|
, contrast_color (LED::Green)
|
||||||
|
, in_range_select (false)
|
||||||
{
|
{
|
||||||
|
|
||||||
build_maps ();
|
build_maps ();
|
||||||
|
|
|
||||||
|
|
@ -599,6 +599,8 @@ class Push2 : public ARDOUR::ControlProtocol
|
||||||
|
|
||||||
uint8_t selection_color;
|
uint8_t selection_color;
|
||||||
uint8_t contrast_color;
|
uint8_t contrast_color;
|
||||||
|
|
||||||
|
bool in_range_select;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace */
|
} /* namespace */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue