QmlDesigner: Use intersection for selection

This is the default for UI tools like Figma or Sketch.

Task-number: QDS-853
Change-Id: Id4f5e0647b87169ec0fc0aaf02c6655ce0f78e45
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-07-30 15:21:37 +02:00
parent 81b0051c91
commit c09344ee62

View File

@@ -90,7 +90,7 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType)
if (!m_beginFormEditorItem)
return;
QList<QGraphicsItem*> itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::ContainsItemBoundingRect);
QList<QGraphicsItem*> itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::IntersectsItemBoundingRect);
QList<QmlItemNode> newNodeList;
foreach (QGraphicsItem* item, itemList)