1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00
This commit is contained in:
wingsummer 2025-03-18 12:24:04 +08:00 committed by GitHub
commit d2fcc332ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

13
src/DockFocusController.cpp Normal file → Executable file
View File

@ -260,7 +260,8 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
return; return;
} }
d->updateDockWidgetFocus(DockWidget); if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget);
} }
@ -298,10 +299,11 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
if (!DockWidget || DockWidget->tabWidget()->isHidden()) if (!DockWidget || DockWidget->tabWidget()->isHidden())
{ {
return; return;
} }
#endif #endif
d->updateDockWidgetFocus(DockWidget); if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget);
} }
@ -309,7 +311,7 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
void CDockFocusController::setDockWidgetTabFocused(CDockWidgetTab* Tab) void CDockFocusController::setDockWidgetTabFocused(CDockWidgetTab* Tab)
{ {
auto DockWidget = Tab->dockWidget(); auto DockWidget = Tab->dockWidget();
if (DockWidget) if (DockWidget && DockWidget->dockManager() == d->DockManager)
{ {
d->updateDockWidgetFocus(DockWidget); d->updateDockWidgetFocus(DockWidget);
} }
@ -327,7 +329,8 @@ void CDockFocusController::clearDockWidgetFocus(CDockWidget* dockWidget)
//=========================================================================== //===========================================================================
void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow) void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow)
{ {
d->updateDockWidgetFocus(focusedNow); if(focusedNow->dockManager() == d->DockManager)
d->updateDockWidgetFocus(focusedNow);
} }