1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix in MidiKeyboardComponent to prevent double notes when using touch input.

This commit is contained in:
jules 2015-02-02 09:10:31 +00:00
parent 37e2fcbf69
commit 6d33253189

View file

@ -696,7 +696,7 @@ void MidiKeyboardComponent::updateNoteUnderMouse (Point<int> pos, bool isDown, i
mouseOverNotes.set (fingerNum, newNote);
}
int oldNoteDown = mouseDownNotes.getUnchecked (fingerNum);
const int oldNoteDown = mouseDownNotes.getUnchecked (fingerNum);
if (isDown)
{
@ -710,7 +710,7 @@ void MidiKeyboardComponent::updateNoteUnderMouse (Point<int> pos, bool isDown, i
state.noteOff (midiChannel, oldNoteDown);
}
if (newNote >= 0)
if (newNote >= 0 && ! mouseDownNotes.contains (newNote))
{
if (! useMousePositionForVelocity)
mousePositionVelocity = 1.0f;