From a0c93328ea94ffaa12ac4980b6b0b658bc449e7a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 3 Oct 2022 15:41:50 -0600 Subject: [PATCH] push2: fix intended behavior of push2 "lower buttons" --- libs/surfaces/push2/cues.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libs/surfaces/push2/cues.cc b/libs/surfaces/push2/cues.cc index a990926470..b611f2295c 100644 --- a/libs/surfaces/push2/cues.cc +++ b/libs/surfaces/push2/cues.cc @@ -274,19 +274,22 @@ CueLayout::show_knob_function () void CueLayout::button_lower (uint32_t n) { - boost::shared_ptr r = _session.get_remote_nth_route (n); - if (!r) { + if (!_route[n]) { + return; + } + + boost::shared_ptr tb = _route[n]->triggerbox(); + + if (!tb) { + /* unpossible! */ return; } if (_p2.stop_down() || _long_stop) { - boost::shared_ptr tb = r->triggerbox(); - if (tb) { - tb->stop_all_quantized(); - } + tb->stop_all_quantized (); } else { /* select track */ - _session.selection().set (r, boost::shared_ptr()); + _session.selection().set (_route[n], boost::shared_ptr()); } }