Skip to content

Commit 52a6435

Browse files
Fixed DockWidgetTab to provide the right size when starting floating
1 parent 79831d4 commit 52a6435

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DockWidgetTab.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,21 +241,23 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState)
241241

242242
ADS_PRINT("startFloating");
243243
DragState = DraggingState;
244-
QSize Size = DockArea->size();
245244
IFloatingWidget* FloatingWidget = nullptr;
246245
bool OpaqueUndocking = CDockManager::configFlags().testFlag(CDockManager::OpaqueUndocking) ||
247246
(DraggingFloatingWidget != DraggingState);
248247

249248
// If section widget has multiple tabs, we take only one tab
250249
// If it has only one single tab, we can move the complete
251250
// dock area into floating widget
251+
QSize Size;
252252
if (DockArea->dockWidgetsCount() > 1)
253253
{
254254
FloatingWidget = createFloatingWidget(DockWidget, OpaqueUndocking);
255+
Size = DockWidget->size();
255256
}
256257
else
257258
{
258259
FloatingWidget = createFloatingWidget(DockArea, OpaqueUndocking);
260+
Size = DockArea->size();
259261
}
260262

261263
if (DraggingFloatingWidget == DraggingState)

0 commit comments

Comments
 (0)