forked from qt-creator/qt-creator
QmlDesigner: Use NodeHints for reparenting in container
Change-Id: Id7ee463a5d526979ee6cc802d28deb7d79b94a07 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -75,8 +75,10 @@ static QList<ModelNode> modelNodesFromMimeData(const QMimeData *mineData, Abstra
|
|||||||
bool fitsToTargetProperty(const NodeAbstractProperty &targetProperty,
|
bool fitsToTargetProperty(const NodeAbstractProperty &targetProperty,
|
||||||
const QList<ModelNode> &modelNodeList)
|
const QList<ModelNode> &modelNodeList)
|
||||||
{
|
{
|
||||||
|
bool const canBeContainer =
|
||||||
|
NodeHints::fromModelNode(targetProperty.parentModelNode()).canBeContainerFor(modelNodeList.first());
|
||||||
return !(targetProperty.isNodeProperty() &&
|
return !(targetProperty.isNodeProperty() &&
|
||||||
modelNodeList.count() > 1);
|
modelNodeList.count() > 1) && canBeContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString msgUnknownItem(const QString &t)
|
static inline QString msgUnknownItem(const QString &t)
|
||||||
|
Reference in New Issue
Block a user