Skip to content

Commit

Permalink
fix: make hotcue_focus_color_next/_prev COs ControlPushButtons
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
Swiftb0y committed Oct 14, 2024
1 parent c38753d commit 866f37a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ void CueControl::createControls() {

m_pHotcueFocus = std::make_unique<ControlObject>(ConfigKey(m_group, "hotcue_focus"));
setHotcueFocusIndex(Cue::kNoHotCue);
m_pHotcueFocusColorPrev = std::make_unique<ControlObject>(
m_pHotcueFocusColorPrev = std::make_unique<ControlPushButton>(
ConfigKey(m_group, "hotcue_focus_color_prev"));
m_pHotcueFocusColorNext = std::make_unique<ControlObject>(
m_pHotcueFocusColorNext = std::make_unique<ControlPushButton>(
ConfigKey(m_group, "hotcue_focus_color_next"));

// Create hotcue controls
Expand Down
4 changes: 2 additions & 2 deletions src/engine/controls/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ class CueControl : public EngineControl {
std::unique_ptr<ControlProxy> m_pVinylControlMode;

std::unique_ptr<ControlObject> m_pHotcueFocus;
std::unique_ptr<ControlObject> m_pHotcueFocusColorNext;
std::unique_ptr<ControlObject> m_pHotcueFocusColorPrev;
std::unique_ptr<ControlPushButton> m_pHotcueFocusColorNext;
std::unique_ptr<ControlPushButton> m_pHotcueFocusColorPrev;

parented_ptr<ControlProxy> m_pPassthrough;

Expand Down

0 comments on commit 866f37a

Please sign in to comment.