Skip to content
Snippets Groups Projects
Commit d65eaadd authored by Kai Koehne's avatar Kai Koehne
Browse files

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
parent 3b94093f
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment