summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree/TreeModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigmodr/tree/TreeModel.cpp')
-rw-r--r--sigmodr/tree/TreeModel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sigmodr/tree/TreeModel.cpp b/sigmodr/tree/TreeModel.cpp
index ff7426bd..4ccd47f5 100644
--- a/sigmodr/tree/TreeModel.cpp
+++ b/sigmodr/tree/TreeModel.cpp
@@ -93,7 +93,7 @@ QModelIndex TreeModel::parent(const QModelIndex& child) const
bool TreeModel::hasChildren(const QModelIndex& parent) const
{
- if (!parent.isValid())
+ if (!parent.isValid() || (0 < parent.column()))
return false;
return (0 < static_cast<TreeItem*>(parent.internalPointer())->childCount());
}
@@ -102,6 +102,8 @@ int TreeModel::rowCount(const QModelIndex& parent) const
{
if (!parent.isValid())
return 0;
+ if (0 < parent.column())
+ return 0;
return static_cast<TreeItem*>(parent.internalPointer())->childCount();
}