Fixed dropping of FloatingDragPreview into center of dock container with only one single visible dock area

If this happens the dropped dock widget needs to get tabified
This commit is contained in:
Uwe Kindler
2020-04-27 14:00:37 +02:00
parent ef855e3843
commit cdc863e962
2 changed files with 54 additions and 31 deletions

View File

@@ -169,14 +169,14 @@ void FloatingDockContainerPrivate::titleMouseReleaseEvent()
|| DockManager->containerOverlay()->dropAreaUnderCursor()
!= InvalidDockWidgetArea)
{
// Resize the floating widget to the size of the highlighted drop area
// rectangle
CDockOverlay *Overlay = DockManager->containerOverlay();
if (!Overlay->dropOverlayRect().isValid())
{
Overlay = DockManager->dockAreaOverlay();
}
// Resize the floating widget to the size of the highlighted drop area
// rectangle
QRect Rect = Overlay->dropOverlayRect();
int FrameWidth = (_this->frameSize().width() - _this->rect().width())
/ 2;