From 52a64350e6f336a4cc011ba20827a6e9e38e364a Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Mon, 27 Apr 2020 07:48:15 +0200 Subject: [PATCH] Fixed DockWidgetTab to provide the right size when starting floating --- src/DockWidgetTab.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 06ec182..2061997 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -241,7 +241,6 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState) ADS_PRINT("startFloating"); DragState = DraggingState; - QSize Size = DockArea->size(); IFloatingWidget* FloatingWidget = nullptr; bool OpaqueUndocking = CDockManager::configFlags().testFlag(CDockManager::OpaqueUndocking) || (DraggingFloatingWidget != DraggingState); @@ -249,13 +248,16 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState) // If section widget has multiple tabs, we take only one tab // If it has only one single tab, we can move the complete // dock area into floating widget + QSize Size; if (DockArea->dockWidgetsCount() > 1) { FloatingWidget = createFloatingWidget(DockWidget, OpaqueUndocking); + Size = DockWidget->size(); } else { FloatingWidget = createFloatingWidget(DockArea, OpaqueUndocking); + Size = DockArea->size(); } if (DraggingFloatingWidget == DraggingState)