diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index bbba72d..597299d 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -1516,16 +1516,6 @@ void CDockContainerWidget::dropWidget(QWidget* Widget, DockWidgetArea DropArea, // If there was a top level widget before the drop, then it is not top // level widget anymore CDockWidget::emitTopLevelEventForWidget(SingleDockWidget, false); - CDockWidget* DockWidget = qobject_cast(Widget); - if (!DockWidget) - { - CDockAreaWidget* DockArea = qobject_cast(Widget); - auto OpenDockWidgets = DockArea->openedDockWidgets(); - if (OpenDockWidgets.count() == 1) - { - DockWidget = OpenDockWidgets[0]; - } - } window()->activateWindow(); d->DockManager->notifyWidgetOrAreaRelocation(Widget);