mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 21:25:44 +08:00
Some refatoring in DockFocusController to improve code
This commit is contained in:
parent
aa25e1fd56
commit
d6831caea4
@ -325,22 +325,22 @@ void CDockFocusController::notifyWidgetOrAreaRelocation(QWidget* DroppedWidget)
|
||||
}
|
||||
|
||||
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(DroppedWidget);
|
||||
if (DockWidget)
|
||||
{
|
||||
d->ForceFocusChangedSignal = true;
|
||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
||||
return;
|
||||
}
|
||||
if (!DockWidget)
|
||||
{
|
||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(DroppedWidget);
|
||||
if (DockArea)
|
||||
{
|
||||
DockWidget = DockArea->currentDockWidget();
|
||||
}
|
||||
}
|
||||
|
||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(DroppedWidget);
|
||||
if (!DockArea)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!DockWidget)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DockWidget = DockArea->currentDockWidget();
|
||||
d->ForceFocusChangedSignal = true;
|
||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user