mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fixed: the focusable CDockWidget would lose focus when another QWindow containing a CDockManager that contains a focusable CDockWidget gains focus
This commit is contained in:
parent
979d76aa47
commit
147afda646
5
src/DockFocusController.cpp
Normal file → Executable file
5
src/DockFocusController.cpp
Normal file → Executable file
@ -260,6 +260,7 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
|
||||
return;
|
||||
}
|
||||
|
||||
if(DockWidget->dockManager() == d->DockManager)
|
||||
d->updateDockWidgetFocus(DockWidget);
|
||||
}
|
||||
|
||||
@ -301,6 +302,7 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
|
||||
}
|
||||
#endif
|
||||
|
||||
if(DockWidget->dockManager() == d->DockManager)
|
||||
d->updateDockWidgetFocus(DockWidget);
|
||||
}
|
||||
|
||||
@ -309,7 +311,7 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
|
||||
void CDockFocusController::setDockWidgetTabFocused(CDockWidgetTab* Tab)
|
||||
{
|
||||
auto DockWidget = Tab->dockWidget();
|
||||
if (DockWidget)
|
||||
if (DockWidget && DockWidget->dockManager() == d->DockManager)
|
||||
{
|
||||
d->updateDockWidgetFocus(DockWidget);
|
||||
}
|
||||
@ -327,6 +329,7 @@ void CDockFocusController::clearDockWidgetFocus(CDockWidget* dockWidget)
|
||||
//===========================================================================
|
||||
void CDockFocusController::setDockWidgetFocused(CDockWidget* focusedNow)
|
||||
{
|
||||
if(focusedNow->dockManager() == d->DockManager)
|
||||
d->updateDockWidgetFocus(focusedNow);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user