Browse Source

Prevent stray mouse-drags triggering the midi component keys by mistake

tags/2021-05-28
jules 10 years ago
parent
commit
a4594e55e7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp

+ 2
- 1
modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp View File

@@ -813,7 +813,8 @@ void MidiKeyboardComponent::timerCallback()
const Array<MouseInputSource>& mouseSources = Desktop::getInstance().getMouseSources();
for (MouseInputSource* mi = mouseSources.begin(), * const e = mouseSources.end(); mi != e; ++mi)
updateNoteUnderMouse (getLocalPoint (nullptr, mi->getScreenPosition()).roundToInt(), mi->isDragging(), mi->getIndex());
if (mi->getComponentUnderMouse() == this || isParentOf (mi->getComponentUnderMouse()))
updateNoteUnderMouse (getLocalPoint (nullptr, mi->getScreenPosition()).roundToInt(), mi->isDragging(), mi->getIndex());
}
}


Loading…
Cancel
Save