mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Added iterator access to Desktop's list of mouse sources.
This commit is contained in:
parent
6045915256
commit
b3fd5cb8a3
5 changed files with 22 additions and 18 deletions
|
|
@ -818,14 +818,13 @@ void MidiKeyboardComponent::timerCallback()
|
|||
|
||||
if (shouldCheckMousePos)
|
||||
{
|
||||
Desktop& desktop = Desktop::getInstance();
|
||||
const OwnedArray<MouseInputSource>& mouseSources = Desktop::getInstance().getMouseSources();
|
||||
|
||||
for (int i = desktop.getNumMouseSources(); --i >= 0;)
|
||||
for (MouseInputSource** i = mouseSources.begin(), ** const e = mouseSources.end(); i != e; ++i)
|
||||
{
|
||||
MouseInputSource* source = desktop.getMouseSource (i);
|
||||
jassert (source != nullptr);
|
||||
updateNoteUnderMouse (getLocalPoint (nullptr, source->getScreenPosition()),
|
||||
source->isDragging(), source->getIndex());
|
||||
const MouseInputSource& source = **i;
|
||||
updateNoteUnderMouse (getLocalPoint (nullptr, source.getScreenPosition()),
|
||||
source.isDragging(), source.getIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue