Interface mockup 15

This commit is contained in:
Dion Moult
2026-05-11 09:17:45 +10:00
parent 1c598a981e
commit 6df9aeda2c
21 changed files with 556 additions and 88 deletions
+4
View File
@@ -107,6 +107,10 @@ ModelsPanel::ModelsPanel(QWidget* parent)
void ModelsPanel::setNodes(const QList<TreeNode>& nodes) {
tree_->clear();
const bool has_hierarchy = std::any_of(nodes.begin(), nodes.end(), [](const TreeNode& node) {
return !node.children.isEmpty() || node.kind == ItemKind::Group;
});
tree_->setRootIsDecorated(has_hierarchy);
for (const auto& node : nodes) {
addNode(tree_->invisibleRootItem(), node);
}