Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't recursively try to handle scroll event logic in nested scroll
areas

Fixes #46871
  • Loading branch information
nyalldawson committed Jan 18, 2022
1 parent f4b7a93 commit 8eb02f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsscrollarea.cpp
Expand Up @@ -144,6 +144,9 @@ void ScrollAreaFilter::addChild( QObject *child )
{
if ( child && child->isWidgetType() )
{
if ( qobject_cast< QScrollArea * >( child ) )
return;

child->installEventFilter( this );
if ( QWidget *w = qobject_cast< QWidget * >( child ) )
w->setMouseTracking( true );
Expand All @@ -161,6 +164,9 @@ void ScrollAreaFilter::removeChild( QObject *child )
{
if ( child && child->isWidgetType() )
{
if ( qobject_cast< QScrollArea * >( child ) )
return;

child->removeEventFilter( this );

// also remove filter on existing children
Expand Down

0 comments on commit 8eb02f7

Please sign in to comment.