Commit 991dcc2c authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Use topMovableFormEditorItem instead of inline code

Change-Id: I5a7e8d38c4188517ceddd8409b93d18582790ac8
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent f617295f
......@@ -143,23 +143,7 @@ void SelectionTool::hoverMoveEvent(const QList<QGraphicsItem*> &itemList,
}
}
FormEditorItem *topSelectableItem = 0;
foreach (QGraphicsItem* item, itemList)
{
FormEditorItem *formEditorItem = FormEditorItem::fromQGraphicsItem(item);
if (formEditorItem
&& formEditorItem->qmlItemNode().isValid()
&& !formEditorItem->qmlItemNode().instanceIsInLayoutable()
&& formEditorItem->qmlItemNode().instanceIsMovable()
&& formEditorItem->qmlItemNode().modelIsMovable()
&& (formEditorItem->qmlItemNode().instanceHasShowContent() || !m_selectOnlyContentItems))
{
topSelectableItem = formEditorItem;
break;
}
}
FormEditorItem *topSelectableItem = topMovableFormEditorItem(itemList, m_selectOnlyContentItems);
scene()->highlightBoundingRect(topSelectableItem);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment