mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-03-16 02:59:51 +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
|
else
|
||||||
{
|
{
|
||||||
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(d->Content);
|
CDockWidget* DockWidget = qobject_cast<CDockWidget*>(d->Content);
|
||||||
|
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
|
||||||
|
|
||||||
CFloatingDockContainer* FloatingWidget = nullptr;
|
CFloatingDockContainer* FloatingWidget = nullptr;
|
||||||
|
|
||||||
if (DockWidget && DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable))
|
if (DockWidget && DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||||
{
|
{
|
||||||
FloatingWidget = new CFloatingDockContainer(DockWidget);
|
FloatingWidget = new CFloatingDockContainer(DockWidget);
|
||||||
}
|
}
|
||||||
else
|
else if (DockArea && DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
||||||
{
|
{
|
||||||
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(d->Content);
|
FloatingWidget = new CFloatingDockContainer(DockArea);
|
||||||
if (DockArea->features().testFlag(CDockWidget::DockWidgetFloatable))
|
|
||||||
{
|
|
||||||
FloatingWidget = new CFloatingDockContainer(DockArea);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FloatingWidget)
|
if (FloatingWidget)
|
||||||
|
Loading…
Reference in New Issue
Block a user