From c6b3694441a4f49e19b05fab9e2ff71359b0e7a3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 21 Nov 2025 22:38:07 -0700 Subject: [PATCH] continue work from 68f4ac3282356 on correct checks for editing context actions --- gtk2_ardour/editing_context.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/editing_context.cc b/gtk2_ardour/editing_context.cc index 270b0ca049..053d17de77 100644 --- a/gtk2_ardour/editing_context.cc +++ b/gtk2_ardour/editing_context.cc @@ -1154,11 +1154,11 @@ EditingContext::set_draw_velocity (int v) { EC_LOCAL_TEMPO_SCOPE; - if (v == DRAW_VEL_AUTO) { - draw_velocity_actions[v]->set_active (true); - } else { - draw_velocity_actions[std::max (std::min (v, 127), 0)]->set_active (true); + if (draw_velocity_actions.find (v) == draw_velocity_actions.end() || draw_velocity_actions[v]) { + return; } + + draw_velocity_actions[v]->set_active (true); } void @@ -1166,11 +1166,11 @@ EditingContext::set_draw_channel (int c) { EC_LOCAL_TEMPO_SCOPE; - if (c == DRAW_CHAN_AUTO) { - draw_channel_actions[c]->set_active (true); - } else { - draw_channel_actions[std::max (std::min (c, 15), 0)]->set_active (true); + if (draw_channel_actions.find (c) == draw_channel_actions.end() || draw_channel_actions[c]) { + return; } + + draw_channel_actions[c]->set_active (true); } void