Properly implemented handling of DockWidget flag DockWidgetIsMovable for NonOpaque undocking - creating the drag preview is allowed even if the DockWidget is not floatable

This commit is contained in:
Uwe Kindler
2020-02-16 14:37:14 +01:00
parent 2c15d5dacd
commit d4a18003d9
5 changed files with 36 additions and 17 deletions

View File

@@ -600,7 +600,11 @@ void CDockAreaTitleBar::mouseMoveEvent(QMouseEvent* ev)
// If one single dock widget in this area is not floatable then the whole
// area is not floatable
if (!d->DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
// If we do non opaque undocking, then we can create the floating drag
// preview if the dock widget is movable
auto Features = d->DockArea->features();
if (!Features.testFlag(CDockWidget::DockWidgetFloatable)
&& !(Features.testFlag(CDockWidget::DockWidgetMovable) && !CDockManager::testConfigFlag(CDockManager::OpaqueUndocking)))
{
return;
}