fix(color): Source selection for curve display (#2894)

This commit is contained in:
eshifri
2022-12-21 21:50:53 +10:00
committed by GitHub
parent 4ad5d87dfc
commit 458dc049e5
+9 -3
View File
@@ -297,13 +297,19 @@ void CurveEdit::onEvent(event_t event)
}
}
void CurveEdit::checkEvents()
{
if (!lockSource) {
int16_t val = getMovedSource(MIXSRC_FIRST_INPUT);
if (val) {
CurveEdit::currentSource = val + 1 - MIXSRC_FIRST_INPUT;
TRACE("source=%d", CurveEdit::currentSource);
if (val > 0) {
if (val > NUM_STICKS + NUM_POTS + NUM_SLIDERS)
CurveEdit::currentSource = val + 1 - MIXSRC_FIRST_INPUT;
else {
CurveEdit::currentSource = expoAddress(val - 1)->srcRaw;
TRACE("Detected source=%d", val);
}
TRACE("Applied source=%d", CurveEdit::currentSource);
}
}
FormField::checkEvents();