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 <Friedemann.Kleint@qt.io>
bb10
Olivier Goffart 2016-06-22 14:18:33 +02:00 committed by Olivier Goffart (Woboq GmbH)
parent db1a6ac357
commit 7a8330ddf7
1 changed files with 2 additions and 1 deletions

View File

@ -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