Fix DockWidget::windowActiveAboutToChange() being emitted too much
Was being emitted even when it didn't affect our window. This caused an explosion of signals when we had many dock widgets.
This commit is contained in:
@@ -601,7 +601,7 @@ bool DockWidgetBase::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
const bool isWindowActivate = event->type() == QEvent::WindowActivate;
|
||||
const bool isWindowDeactivate = event->type() == QEvent::WindowDeactivate;
|
||||
if (isWindowActivate || isWindowDeactivate)
|
||||
if ((isWindowActivate || isWindowDeactivate) && watched == window())
|
||||
Q_EMIT windowActiveAboutToChange(isWindowActivate);
|
||||
|
||||
return QWidgetAdapter::eventFilter(watched, event);
|
||||
|
||||
Reference in New Issue
Block a user