ADS: Fix workspace corruption

Don't insert widget into area twice as that corrupts the workspace.

Fixes: QDS-10351
Fixes: QDS-10388
Change-Id: Icacddf2a95243beee5d6314fbdc38e284639ecec
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-08-03 16:27:50 +03:00
parent 6f5e9417d8
commit 9f7f82aeff

View File

@@ -460,7 +460,6 @@ void DockContainerWidgetPrivate::dropIntoCenterOfSection(FloatingDockContainer *
for (int i = 0; i < newDockWidgets.count(); ++i) { for (int i = 0; i < newDockWidgets.count(); ++i) {
DockWidget *dockWidget = newDockWidgets[i]; DockWidget *dockWidget = newDockWidgets[i];
targetArea->insertDockWidget(tabIndex + i, dockWidget, false); targetArea->insertDockWidget(tabIndex + i, dockWidget, false);
targetArea->insertDockWidget(i, dockWidget, false);
// If the floating widget contains multiple visible dock areas, then we simply pick the // If the floating widget contains multiple visible dock areas, then we simply pick the
// first visible open dock widget and make it the current one. // first visible open dock widget and make it the current one.
if (newCurrentIndex < 0 && !dockWidget->isClosed()) if (newCurrentIndex < 0 && !dockWidget->isClosed())