mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-01 02:42:39 +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);
|
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(DroppedWidget);
|
||||||
if (DockWidget)
|
if (!DockWidget)
|
||||||
{
|
{
|
||||||
d->ForceFocusChangedSignal = true;
|
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(DroppedWidget);
|
||||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
if (DockArea)
|
||||||
return;
|
{
|
||||||
}
|
DockWidget = DockArea->currentDockWidget();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(DroppedWidget);
|
if (!DockWidget)
|
||||||
if (!DockArea)
|
{
|
||||||
{
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DockWidget = DockArea->currentDockWidget();
|
|
||||||
d->ForceFocusChangedSignal = true;
|
d->ForceFocusChangedSignal = true;
|
||||||
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
CDockManager::setWidgetFocus(DockWidget->tabWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user