mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Component: Only pass mouse wheel and magnify events up to enabled parents
This commit is contained in:
parent
7a8a4944cb
commit
a852f4f45f
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue