From a852f4f45f7d49fd8c800983655609a089d90959 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 8 Oct 2021 11:31:31 +0100 Subject: [PATCH] Component: Only pass mouse wheel and magnify events up to enabled parents --- modules/juce_gui_basics/components/juce_Component.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 00211b13b4..245f0bb91d 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -2247,14 +2247,14 @@ void Component::mouseDoubleClick (const MouseEvent&) {} void Component::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) { // the base class just passes this event up to its parent.. - if (parentComponent != nullptr) + if (parentComponent != nullptr && parentComponent->isEnabled()) parentComponent->mouseWheelMove (e.getEventRelativeTo (parentComponent), wheel); } void Component::mouseMagnify (const MouseEvent& e, float magnifyAmount) { // the base class just passes this event up to its parent.. - if (parentComponent != nullptr) + if (parentComponent != nullptr && parentComponent->isEnabled()) parentComponent->mouseMagnify (e.getEventRelativeTo (parentComponent), magnifyAmount); }