Fixed issue #597 - Crashes when the floating widget moves to the dock manager and then tries to drag it back

This commit is contained in:
Uwe Kindler
2024-01-16 14:03:53 +01:00
parent 8fd691968c
commit 9bdefd6055
4 changed files with 24 additions and 5 deletions

View File

@@ -1643,6 +1643,15 @@ emitAndExit:
}
//============================================================================
QList<QPointer<CDockAreaWidget>> CDockContainerWidget::removeAllDockAreas()
{
auto Result = d->DockAreas;
d->DockAreas.clear();
return Result;
}
//============================================================================
CDockAreaWidget* CDockContainerWidget::dockAreaAt(const QPoint& GlobalPos) const
{
@@ -1756,7 +1765,7 @@ void CDockContainerWidget::dropFloatingWidget(CFloatingDockContainer* FloatingWi
if (Dropped)
{
// Fix https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/351
FloatingWidget->hideAndDeleteLater();
FloatingWidget->finishDropOperation();
// If we dropped a floating widget with only one single dock widget, then we
// drop a top level widget that changes from floating to docked now