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

Component: Use the rounded integer mouse position when evaluating hitTest

This commit reverts a small part of
4ca923a34b.
This commit is contained in:
attila 2022-06-09 15:45:38 +02:00
parent 032cc528c8
commit 5d5610286f

View file

@ -327,7 +327,7 @@ struct Component::ComponentHelpers
static bool hitTest (Component& comp, Point<float> localPoint)
{
const auto intPoint = localPoint.roundToInt();
return Rectangle<int> { comp.getWidth(), comp.getHeight() }.toFloat().contains (localPoint)
return Rectangle<int> { comp.getWidth(), comp.getHeight() }.contains (intPoint)
&& comp.hitTest (intPoint.x, intPoint.y);
}