forked from qt-creator/qt-creator
QmlDesigner: Fix selection issues in navigator and 3d edit view
Fixed multiple issues with showing correct selection in navigator and 3d edit view: - Dragging items from item library selects only that item, regardless if drag was done to 3d edit view or navigator - Selection is shown correctly after reparenting items, including multiselection reparenting - Adding a new item to the active scene now shows selection box correctly for that item Change-Id: I5156ca4c22e606c41e1e346ea5c32c3d70d89f5e Fixes: QDS-1577 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -117,7 +117,10 @@ void Edit3DCanvas::dropEvent(QDropEvent *e)
|
||||
{
|
||||
Q_UNUSED(e)
|
||||
|
||||
QmlVisualNode::createQml3DNode(m_parent->view(), m_itemLibraryEntry, m_activeScene);
|
||||
auto modelNode = QmlVisualNode::createQml3DNode(m_parent->view(), m_itemLibraryEntry, m_activeScene).modelNode();
|
||||
|
||||
if (modelNode.isValid())
|
||||
m_parent->view()->setSelectedModelNode(modelNode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user