From 866f37a344c1af76d14b01732a218cb49a426cda Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:29:10 +0200 Subject: [PATCH] fix: make `hotcue_focus_color_next`/`_prev` COs `ControlPushButton`s This fixes two issues: 1. The Control is not accessible via the controller mapping XML 2. The Control ignores nops, leading to confusing why `engine.setValue(group, ..., 1)` was only working on the first press (which is a confusion that comes up because this is not the case for other button-like controls, since those are implemented using `ControlPushButton`). --- src/engine/controls/cuecontrol.cpp | 4 ++-- src/engine/controls/cuecontrol.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/controls/cuecontrol.cpp b/src/engine/controls/cuecontrol.cpp index f1ea60590f7..69cf6070f7d 100644 --- a/src/engine/controls/cuecontrol.cpp +++ b/src/engine/controls/cuecontrol.cpp @@ -201,9 +201,9 @@ void CueControl::createControls() { m_pHotcueFocus = std::make_unique(ConfigKey(m_group, "hotcue_focus")); setHotcueFocusIndex(Cue::kNoHotCue); - m_pHotcueFocusColorPrev = std::make_unique( + m_pHotcueFocusColorPrev = std::make_unique( ConfigKey(m_group, "hotcue_focus_color_prev")); - m_pHotcueFocusColorNext = std::make_unique( + m_pHotcueFocusColorNext = std::make_unique( ConfigKey(m_group, "hotcue_focus_color_next")); // Create hotcue controls diff --git a/src/engine/controls/cuecontrol.h b/src/engine/controls/cuecontrol.h index 3ba5a1d97a6..4f90d6ba30f 100644 --- a/src/engine/controls/cuecontrol.h +++ b/src/engine/controls/cuecontrol.h @@ -352,8 +352,8 @@ class CueControl : public EngineControl { std::unique_ptr m_pVinylControlMode; std::unique_ptr m_pHotcueFocus; - std::unique_ptr m_pHotcueFocusColorNext; - std::unique_ptr m_pHotcueFocusColorPrev; + std::unique_ptr m_pHotcueFocusColorNext; + std::unique_ptr m_pHotcueFocusColorPrev; parented_ptr m_pPassthrough;