forked from qt-creator/qt-creator
QuickDesigner: Support nesting of all nodes in navigator
Don't check for isContainer, which is rather a hint for the visual editor whether to nest automatically. In the navigator case, the user explicitly requested a nesting, and we shouldn't prevent him from doing so. Task-number: BAUHAUS-650 Reviewed-by: Christiaan Janssen
This commit is contained in:
@@ -186,23 +186,25 @@ NavigatorTreeModel::ItemRow NavigatorTreeModel::createItemRow(const ModelNode &n
|
||||
|
||||
uint hash = qHash(node);
|
||||
|
||||
const bool dropEnabled = node.metaInfo().isValid();
|
||||
|
||||
QStandardItem *idItem = new QStandardItem;
|
||||
idItem->setDragEnabled(true);
|
||||
idItem->setDropEnabled(node.metaInfo().isValid() && node.metaInfo().isContainer());
|
||||
idItem->setDropEnabled(dropEnabled);
|
||||
idItem->setEditable(true);
|
||||
idItem->setData(hash, Qt::UserRole);
|
||||
|
||||
#ifdef _LOCK_ITEMS_
|
||||
QStandardItem *lockItem = new QStandardItem;
|
||||
lockItem->setDragEnabled(true);
|
||||
lockItem->setDropEnabled(node.metaInfo().isContainer());
|
||||
lockItem->setDropEnabled(dropEnabled);
|
||||
lockItem->setEditable(false);
|
||||
lockItem->setCheckable(true);
|
||||
lockItem->setData(hash, Qt::UserRole);
|
||||
#endif
|
||||
|
||||
QStandardItem *visibilityItem = new QStandardItem;
|
||||
visibilityItem->setDropEnabled(node.metaInfo().isValid() && node.metaInfo().isContainer());
|
||||
visibilityItem->setDropEnabled(dropEnabled);
|
||||
visibilityItem->setCheckable(true);
|
||||
visibilityItem->setEditable(false);
|
||||
visibilityItem->setData(hash, Qt::UserRole);
|
||||
|
||||
Reference in New Issue
Block a user