MidiKeyboardComponent leaves notes highlighted when moving mouse out of window slowly.
int MidiKeyboardComponent::xyToNote (Point<float> pos, float& mousePositionVelocity)
{
if (! reallyContains (pos.toInt(), false))
return -1;
Assume pos = {0,-0.1} that means the mouse is outside the component. However when it gets cast to int it will be {0,0} which is inside the window. So when the mouse exits the note under the mouse never gets cleared.
bool Component::reallyContains (Point<int> point, bool returnTrueIfWithinAChild)
{
return reallyContainsInternal (point.toFloat(), returnTrueIfWithinAChild);
}
reallyContains just casts the point back to a float and then calls reallyContainsInternal. If I could have access to reallyContainsInternal then then I wouldn’t need to go float → int → float and this wouldn’t be a bug.
Please make float versions of contains and reallyContains.
