Merge pull request #946 from paulfd/keyboard-highlight

Don't draw a white keyboard if all keys are used
This commit is contained in:
Paul Ferrand 2021-07-10 10:14:01 +02:00 committed by GitHub
commit 1125d3c3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,7 +164,6 @@ void SPiano::draw(CDrawContext* dc)
const Dimensions dim = getDimensions(false);
const unsigned octs = impl.octs_;
const unsigned keyCount = octs * 12;
const bool allKeysUsed = impl.keyUsed_.all();
dc->setDrawMode(kAntiAliasing);
@ -184,8 +183,6 @@ void SPiano::draw(CDrawContext* dc)
switch (getKeyRole(key)) {
case KeyRole::Note:
if (allKeysUsed)
goto whiteKeyDefault;
hcy.h = impl.keyUsedHue_;
break;
case KeyRole::Switch:
@ -224,8 +221,6 @@ void SPiano::draw(CDrawContext* dc)
switch (getKeyRole(key)) {
case KeyRole::Note:
if (allKeysUsed)
goto blackKeyDefault;
hcy.h = impl.keyUsedHue_;
break;
case KeyRole::Switch: