summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/spinfld.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 1eb8357a2940..2bdbdad66c75 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -543,13 +543,9 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt)
{
if ((rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && !IsReadOnly())
{
+ const tools::Rectangle aRect(Point(0, 0), GetSizePixel());
const Point& rMousePos = rNEvt.GetCommandEvent()->GetMousePosPixel();
- bool bMouseHovered = maUpperRect.Contains(rMousePos) || maLowerRect.Contains(rMousePos);
- if (!bMouseHovered && mpEdit)
- {
- const tools::Rectangle aEditRect(mpEdit->GetPosPixel(), mpEdit->GetSizePixel());
- bMouseHovered = aEditRect.Contains(rMousePos);
- }
+ const bool bMouseHovered = aRect.Contains(rMousePos);
MouseWheelBehaviour nWheelBehavior(GetSettings().GetMouseSettings().GetWheelBehavior());
if (bMouseHovered