Fixed regression #132 - Inner drop areas don't work with multi tab DockWidgets

This commit is contained in:
Uwe Kindler 2020-03-12 20:29:03 +01:00
parent 6c687d28de
commit 1c2383f8eb

View File

@ -1452,30 +1452,9 @@ void CDockContainerWidget::dropFloatingWidget(CFloatingDockContainer* FloatingWi
} }
/**
* Returns the dock area for a dropped widget.
*/
CDockAreaWidget* droppedDockArea(QWidget* Widget)
{
auto DroppedArea = qobject_cast<CDockAreaWidget*>(Widget);
if (!DroppedArea)
{
auto DroppedWidget = qobject_cast<CDockWidget*>(Widget);
DroppedArea = DroppedWidget->dockAreaWidget();
}
return DroppedArea;
}
//============================================================================ //============================================================================
void CDockContainerWidget::dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget) void CDockContainerWidget::dropWidget(QWidget* Widget, DockWidgetArea DropArea, CDockAreaWidget* TargetAreaWidget)
{ {
if (TargetAreaWidget && TargetAreaWidget == droppedDockArea(Widget))
{
return;
}
CDockWidget* SingleDockWidget = topLevelDockWidget(); CDockWidget* SingleDockWidget = topLevelDockWidget();
if (TargetAreaWidget) if (TargetAreaWidget)
{ {