Fixed notifyFloatingWidgetDrop() function

This commit is contained in:
Uwe Kindler 2021-07-28 13:44:34 +02:00
parent 5af7492b67
commit 1e3af06bb0

View File

@ -251,6 +251,8 @@ void CDockFocusController::onFocusWindowChanged(QWindow *focusWindow)
//=========================================================================== //===========================================================================
void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focusedNow) void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidget* focusedNow)
{ {
Q_UNUSED(focusedOld);
if (d->DockManager->isRestoringState()) if (d->DockManager->isRestoringState())
{ {
return; return;
@ -372,13 +374,6 @@ void CDockFocusController::notifyFloatingWidgetDrop(CFloatingDockContainer* Floa
auto DockWidget = vDockWidget.value<CDockWidget*>(); auto DockWidget = vDockWidget.value<CDockWidget*>();
if (DockWidget) if (DockWidget)
{ {
/*auto Window = DockWidget->dockContainer()->window()->windowHandle();
DockWidget->dockContainer()->window()->clearFocus();
if (Window)
{
Window->setProperty("FocusedDockWidget", QVariant::fromValue<CDockWidget*>(DockWidget));
}*/
d->FocusedDockWidget = nullptr;
DockWidget->dockAreaWidget()->setCurrentDockWidget(DockWidget); DockWidget->dockAreaWidget()->setCurrentDockWidget(DockWidget);
CDockManager::setWidgetFocus(DockWidget); CDockManager::setWidgetFocus(DockWidget);
} }