Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b22edd3

Browse files
committedJan 25, 2022
Don't recursively try to handle scroll event logic in nested scroll
areas Fixes #46871 (cherry picked from commit f589e6e)
1 parent 7580b8b commit b22edd3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/qgsscrollarea.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ void ScrollAreaFilter::addChild( QObject *child )
144144
{
145145
if ( child && child->isWidgetType() )
146146
{
147+
if ( qobject_cast< QScrollArea * >( child ) )
148+
return;
149+
147150
child->installEventFilter( this );
148151
if ( QWidget *w = qobject_cast< QWidget * >( child ) )
149152
w->setMouseTracking( true );
@@ -161,6 +164,9 @@ void ScrollAreaFilter::removeChild( QObject *child )
161164
{
162165
if ( child && child->isWidgetType() )
163166
{
167+
if ( qobject_cast< QScrollArea * >( child ) )
168+
return;
169+
164170
child->removeEventFilter( this );
165171

166172
// also remove filter on existing children

0 commit comments

Comments
 (0)
Please sign in to comment.