cleaner dock widget side tab click handling

This commit is contained in:
Syarif Fakhri 2022-10-14 17:47:41 +08:00
parent efb87c868b
commit 91190e8744
2 changed files with 1 additions and 8 deletions

View File

@ -437,6 +437,7 @@ void CAutoHideDockContainer::collapseView(bool Enable)
d->DockWidget->show();
updateSize();
updateMask();
d->DockManager->setDockWidgetFocused(d->DockWidget);
qApp->installEventFilter(this);
}
}

View File

@ -1085,15 +1085,7 @@ void CDockWidget::onDockWidgetSideTabClicked()
return;
}
autoHideContainer->raise();
autoHideContainer->toggleCollapseState();
if (autoHideContainer->isVisible())
{
// d->DockManager->setDockWidgetFocused(this) does not
// de focus the old widget, leading to the auto hide still being visible
// even after clicking outside the auto hide.
setFocus(Qt::ActiveWindowFocusReason);
}
}
//============================================================================