1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +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 74af7b11ec
commit 751d85f8c7

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);
}