QmlDesigner: Use NodeHints for reparenting in container

Change-Id: Id7ee463a5d526979ee6cc802d28deb7d79b94a07
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-02-14 17:43:57 +01:00
parent 5064bddff6
commit 5be19869aa

View File

@@ -75,8 +75,10 @@ static QList<ModelNode> modelNodesFromMimeData(const QMimeData *mineData, Abstra
bool fitsToTargetProperty(const NodeAbstractProperty &targetProperty,
const QList<ModelNode> &modelNodeList)
{
bool const canBeContainer =
NodeHints::fromModelNode(targetProperty.parentModelNode()).canBeContainerFor(modelNodeList.first());
return !(targetProperty.isNodeProperty() &&
modelNodeList.count() > 1);
modelNodeList.count() > 1) && canBeContainer;
}
static inline QString msgUnknownItem(const QString &t)