Some refatoring in DockFocusController to improve code

This commit is contained in:
Uwe Kindler 2020-07-13 08:43:51 +02:00
parent aa25e1fd56
commit d6831caea4

View File

@ -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());
}