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:
parent
37e2fcbf69
commit
6d33253189
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue