push2: fix intended behavior of push2 "lower buttons"

This commit is contained in:
Paul Davis 2022-10-03 15:41:50 -06:00
parent 9662e6eac0
commit a0c93328ea

View File

@ -274,19 +274,22 @@ CueLayout::show_knob_function ()
void
CueLayout::button_lower (uint32_t n)
{
boost::shared_ptr<Route> r = _session.get_remote_nth_route (n);
if (!r) {
if (!_route[n]) {
return;
}
boost::shared_ptr<TriggerBox> tb = _route[n]->triggerbox();
if (!tb) {
/* unpossible! */
return;
}
if (_p2.stop_down() || _long_stop) {
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
if (tb) {
tb->stop_all_quantized();
}
tb->stop_all_quantized ();
} else {
/* select track */
_session.selection().set (r, boost::shared_ptr<AutomationControl>());
_session.selection().set (_route[n], boost::shared_ptr<AutomationControl>());
}
}