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:
parent
032cc528c8
commit
5d5610286f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue