From 7a8330ddf7601608346036e2f120a4497e016ee8 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 22 Jun 2016 14:18:33 +0200 Subject: Fix QDockWidget losing decoration on undocking when GroupedDragging is enabled We should not remember the wrong undocked geometry. If the dockwidget is not floating, the geometry is not relative to the global coordinate, it makes no sense to store it. Task-number: QTBUG-53808 Change-Id: I242467d8da62d7c787eca2c784aeec646236cb44 Reviewed-by: Friedemann Kleint --- src/widgets/widgets/qdockwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/widgets/qdockwidget.cpp') diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index a7e04d3bfc..20f35cb211 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -805,7 +805,8 @@ void QDockWidgetPrivate::endDrag(bool abort) } else { setResizerActive(false); } - undockedGeometry = q->geometry(); + if (q->isFloating()) // Might not be floating when dragging a QDockWidgetGroupWindow + undockedGeometry = q->geometry(); q->activateWindow(); } else { // The tab was not plugged back in the QMainWindow but the QDockWidget cannot -- cgit v1.2.3