mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
Fixed crash when trying to make a CDockWidget floating in non-opaque mode if the CDockWidget is not floatable
This commit is contained in:
parent
52a64350e6
commit
842d417e8d
@ -299,19 +299,17 @@ void CFloatingDragPreview::finishDragging()
|
||||
else
|
||||
{
|
||||
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(d->Content);
|
||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
|
||||
|
||||
CFloatingDockContainer* FloatingWidget = nullptr;
|
||||
|
||||
if (DockWidget && DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||
{
|
||||
FloatingWidget = new CFloatingDockContainer(DockWidget);
|
||||
}
|
||||
else
|
||||
else if (DockArea && DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||
{
|
||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
|
||||
if (DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||
{
|
||||
FloatingWidget = new CFloatingDockContainer(DockArea);
|
||||
}
|
||||
FloatingWidget = new CFloatingDockContainer(DockArea);
|
||||
}
|
||||
|
||||
if (FloatingWidget)
|
||||
|
Loading…
Reference in New Issue
Block a user