diff --git a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp index 568991863..b425f59ea 100644 --- a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp +++ b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp @@ -1070,8 +1070,15 @@ void ToolWindowManager::updateDragPosition() QPoint c = areaClientRect.center(); - m_dropHotspots[AddTo]->move(c + QPoint(-hsize, -hsize)); - m_dropHotspots[AddTo]->show(); + if(m_hoverArea->allowUserDrop()) + { + m_dropHotspots[AddTo]->move(c + QPoint(-hsize, -hsize)); + m_dropHotspots[AddTo]->show(); + } + else + { + m_dropHotspots[AddTo]->hide(); + } m_dropHotspots[TopOf]->move(c + QPoint(-hsize, -hsize - margin - size)); m_dropHotspots[TopOf]->show(); @@ -1322,9 +1329,12 @@ void ToolWindowManager::finishDrag() { if(m_hoverArea) { - AreaReference ref(hotspot, m_hoverArea); - ref.dragResult = true; - moveToolWindows(draggedToolWindows, ref); + if(m_hoverArea->allowUserDrop() || hotspot != AreaReferenceType::AddTo) + { + AreaReference ref(hotspot, m_hoverArea); + ref.dragResult = true; + moveToolWindows(draggedToolWindows, ref); + } } else { @@ -1387,7 +1397,9 @@ void ToolWindowManager::drawHotspotPixmaps() QPointF tip = fullRect.center() + QPointF(4, 0); path.addPolygon(QPolygonF({ - tip, tip + QPoint(3, 3), tip + QPoint(3, -3), + tip, + tip + QPoint(3, 3), + tip + QPoint(3, -3), })); } else if(ref == TopOf) @@ -1395,7 +1407,9 @@ void ToolWindowManager::drawHotspotPixmaps() QPointF tip = fullRect.center() + QPointF(0, 4); path.addPolygon(QPolygonF({ - tip, tip + QPointF(-3, 3), tip + QPointF(3, 3), + tip, + tip + QPointF(-3, 3), + tip + QPointF(3, 3), })); } else if(ref == RightOf) @@ -1403,7 +1417,9 @@ void ToolWindowManager::drawHotspotPixmaps() QPointF tip = fullRect.center() + QPointF(-4, 0); path.addPolygon(QPolygonF({ - tip, tip + QPointF(-3, 3), tip + QPointF(-3, -3), + tip, + tip + QPointF(-3, 3), + tip + QPointF(-3, -3), })); } else if(ref == BottomOf) @@ -1411,7 +1427,9 @@ void ToolWindowManager::drawHotspotPixmaps() QPointF tip = fullRect.center() + QPointF(0, -4); path.addPolygon(QPolygonF({ - tip, tip + QPointF(-3, -3), tip + QPointF(3, -3), + tip, + tip + QPointF(-3, -3), + tip + QPointF(3, -3), })); }