Skip to content

Commit 60d915a

Browse files
Changed SideTab check in AutoHideDockContainer::eventFilter to improve performance a little bit
1 parent 47e4a60 commit 60d915a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/AutoHideDockContainer.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,15 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
549549
return Super::eventFilter(watched, event);
550550
}
551551

552+
// Now check, if the user clicked into the side tab and ignore this event,
553+
// because the side tab click handler will call collapseView(). If we
554+
// do not ignore this here, then we will collapse the container and the side tab
555+
// click handler will uncollapse it
556+
if (widget == d->SideTab.data())
557+
{
558+
return Super::eventFilter(watched, event);
559+
}
560+
552561
// Now we check, if the user clicked inside of this auto hide container.
553562
// If the click is inside of this auto hide container, then we can
554563
// ignore the event, because the auto hide overlay should not get collapsed if
@@ -558,15 +567,6 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
558567
return Super::eventFilter(watched, event);
559568
}
560569

561-
// Now check, if the user clicked into the side tab and ignore this event,
562-
// because the side tab click handler will call collapseView(). If we
563-
// do not ignore this here, then we will collapse the container and the side tab
564-
// click handler will uncollapse it
565-
if (isObjectOrAncestor(widget, d->SideTab.data()))
566-
{
567-
return Super::eventFilter(watched, event);
568-
}
569-
570570
// Ignore the mouse click if it is not inside of this container
571571
if (!isObjectOrAncestor(widget, dockContainer()))
572572
{

0 commit comments

Comments
 (0)