Save the last floating geometry right before docking

Previously it was only saved on close(), which isn't enough
This commit is contained in:
Sergio Martins
2020-05-22 11:01:31 +01:00
parent 76ba261f62
commit b3b25ba047

View File

@@ -103,6 +103,11 @@ void DropArea::addDockWidget(DockWidgetBase *dw, Location location, DockWidgetBa
Frame *frame = nullptr;
Frame *relativeToFrame = relativeTo ? relativeTo->frame() : nullptr;
if (dw->isFloating()) {
// It's getting docked, save last floating position
dw->lastPositions().setLastFloatingGeometry(dw->window()->geometry());
}
// Check if the dock widget already exists in the layout
if (contains(dw)) {
Frame *oldFrame = dw->frame();