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

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

@ -260,6 +260,7 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
return; return;
} }
if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget); d->updateDockWidgetFocus(DockWidget);
} }
@ -301,6 +302,7 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
} }
#endif #endif
if(DockWidget->dockManager() == d->DockManager)
d->updateDockWidgetFocus(DockWidget); 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,6 +329,7 @@ void CDockFocusController::clearDockWidgetFocus(CDockWidget* dockWidget)
//=========================================================================== //===========================================================================
void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow) void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow)
{ {
if(focusedNow->dockManager() == d->DockManager)
d->updateDockWidgetFocus(focusedNow); d->updateDockWidgetFocus(focusedNow);
} }