mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Changed SideTab check in AutoHideDockContainer::eventFilter to improve performance a little bit
This commit is contained in:
parent
47e4a6065a
commit
60d915a99f
@ -549,6 +549,15 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
|
|||||||
return Super::eventFilter(watched, event);
|
return Super::eventFilter(watched, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now check, if the user clicked into the side tab and ignore this event,
|
||||||
|
// because the side tab click handler will call collapseView(). If we
|
||||||
|
// do not ignore this here, then we will collapse the container and the side tab
|
||||||
|
// click handler will uncollapse it
|
||||||
|
if (widget == d->SideTab.data())
|
||||||
|
{
|
||||||
|
return Super::eventFilter(watched, event);
|
||||||
|
}
|
||||||
|
|
||||||
// Now we check, if the user clicked inside of this auto hide container.
|
// Now we check, if the user clicked inside of this auto hide container.
|
||||||
// If the click is inside of this auto hide container, then we can
|
// If the click is inside of this auto hide container, then we can
|
||||||
// ignore the event, because the auto hide overlay should not get collapsed if
|
// ignore the event, because the auto hide overlay should not get collapsed if
|
||||||
@ -558,15 +567,6 @@ bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
|
|||||||
return Super::eventFilter(watched, event);
|
return Super::eventFilter(watched, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now check, if the user clicked into the side tab and ignore this event,
|
|
||||||
// because the side tab click handler will call collapseView(). If we
|
|
||||||
// do not ignore this here, then we will collapse the container and the side tab
|
|
||||||
// click handler will uncollapse it
|
|
||||||
if (isObjectOrAncestor(widget, d->SideTab.data()))
|
|
||||||
{
|
|
||||||
return Super::eventFilter(watched, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ignore the mouse click if it is not inside of this container
|
// Ignore the mouse click if it is not inside of this container
|
||||||
if (!isObjectOrAncestor(widget, dockContainer()))
|
if (!isObjectOrAncestor(widget, dockContainer()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user