QmlDesigner: Fix rubberband

Everyone agreed that the rubberband selection should be
inclusive. There is no need to require that all items are sub children
of the same item. This seems confusing.

Change-Id: I5fffbc72e0ef15a82fc9f0ab589c865581359775
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-06-30 18:21:08 +02:00
parent 7400ad0a5a
commit e1615024cf

View File

@@ -88,7 +88,7 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType)
if (!m_beginFormEditorItem) if (!m_beginFormEditorItem)
return; return;
QList<QGraphicsItem*> itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::IntersectsItemShape); QList<QGraphicsItem*> itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::ContainsItemBoundingRect);
QList<QmlItemNode> newNodeList; QList<QmlItemNode> newNodeList;
foreach (QGraphicsItem* item, itemList) foreach (QGraphicsItem* item, itemList)
@@ -97,7 +97,6 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType)
if (formEditorItem if (formEditorItem
&& formEditorItem->qmlItemNode().isValid() && formEditorItem->qmlItemNode().isValid()
&& m_beginFormEditorItem->childItems().contains(formEditorItem)
&& formEditorItem->qmlItemNode().instanceIsMovable() && formEditorItem->qmlItemNode().instanceIsMovable()
&& formEditorItem->qmlItemNode().modelIsMovable() && formEditorItem->qmlItemNode().modelIsMovable()
&& !formEditorItem->qmlItemNode().instanceIsInLayoutable()) && !formEditorItem->qmlItemNode().instanceIsInLayoutable())