From e1615024cf9f22be8ecb64e5443f69523ea04547 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 30 Jun 2017 18:21:08 +0200 Subject: [PATCH] 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 --- .../components/formeditor/rubberbandselectionmanipulator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp index f52832bbc72..b2969ed8101 100644 --- a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.cpp @@ -88,7 +88,7 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType) if (!m_beginFormEditorItem) return; - QList itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::IntersectsItemShape); + QList itemList = m_editorView->scene()->items(m_selectionRectangleElement.rect(), Qt::ContainsItemBoundingRect); QList newNodeList; foreach (QGraphicsItem* item, itemList) @@ -97,7 +97,6 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType) if (formEditorItem && formEditorItem->qmlItemNode().isValid() - && m_beginFormEditorItem->childItems().contains(formEditorItem) && formEditorItem->qmlItemNode().instanceIsMovable() && formEditorItem->qmlItemNode().modelIsMovable() && !formEditorItem->qmlItemNode().instanceIsInLayoutable())