summaryrefslogtreecommitdiffstats
path: root/common/modelresult.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/modelresult.h')
-rw-r--r--common/modelresult.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/modelresult.h b/common/modelresult.h
index 3b45955..1675e60 100644
--- a/common/modelresult.h
+++ b/common/modelresult.h
@@ -131,7 +131,11 @@ public:
131 break; 131 break;
132 } 132 }
133 } 133 }
134 beginInsertRows(parent, index, index); 134 if (mEntities.contains(childId)) {
135 qWarning() << "Entity already in model " << value->identifier();
136 return;
137 }
138 beginInsertRows(QModelIndex(), index, index);
135 mEntities.insert(childId, value); 139 mEntities.insert(childId, value);
136 mTree[id].insert(index, childId); 140 mTree[id].insert(index, childId);
137 mParents.insert(childId, id); 141 mParents.insert(childId, id);