From 7ca0ed532d3c3e0b8e64c66f3f3db84dc7ac244f Mon Sep 17 00:00:00 2001 From: Strongheart Date: Mon, 2 May 2022 23:05:58 +0200 Subject: [PATCH] Display playing note when no notes are enabled --- src/Quantizer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Quantizer.cpp b/src/Quantizer.cpp index ec0461c..054d58b 100644 --- a/src/Quantizer.cpp +++ b/src/Quantizer.cpp @@ -131,7 +131,7 @@ struct PianoNote : OpaqueWidget { kInit, kDisabled, kEnabledNotPlaying, - kEnabledAndPlaying + kPlaying } state = kInit; int note; @@ -182,7 +182,7 @@ struct PianoNote : OpaqueWidget { for (int i=0; i<2; ++i) { if (shapes[i] == nullptr) break; - shapes[i]->opacity = state == kDisabled ? 0.f : opacities[i] * (state == kEnabledAndPlaying ? 1.f : 0.5f); + shapes[i]->opacity = state == kDisabled ? 0.f : opacities[i] * (state == kPlaying ? 1.f : 0.5f); } if (svgFb != nullptr) svgFb->setDirty(); @@ -211,8 +211,8 @@ struct PianoNote : OpaqueWidget { return; } - const State newstate = !module->enabledNotes[note] ? kDisabled - : module->playingNotes[note] ? kEnabledAndPlaying : kEnabledNotPlaying; + const State newstate = module->playingNotes[note] ? kPlaying + : module->enabledNotes[note] ? kEnabledNotPlaying : kDisabled; if (newstate != state) { state = newstate;