Browse Source

Component: Only pass mouse wheel and magnify events up to enabled parents

v6.1.6
ed 4 years ago
parent
commit
a852f4f45f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_gui_basics/components/juce_Component.cpp

+ 2
- 2
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -2247,14 +2247,14 @@ void Component::mouseDoubleClick (const MouseEvent&) {}
void Component::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel) void Component::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel)
{ {
// the base class just passes this event up to its parent.. // 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); parentComponent->mouseWheelMove (e.getEventRelativeTo (parentComponent), wheel);
} }
void Component::mouseMagnify (const MouseEvent& e, float magnifyAmount) void Component::mouseMagnify (const MouseEvent& e, float magnifyAmount)
{ {
// the base class just passes this event up to its parent.. // 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); parentComponent->mouseMagnify (e.getEventRelativeTo (parentComponent), magnifyAmount);
} }


Loading…
Cancel
Save