diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-19 17:37:39 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-11-19 17:37:39 +0100 |
commit | 8d5684292ef92f32487ba32df716a00c4a0841b5 (patch) | |
tree | 1af55d3216f79175a55c1890d75cef2ae1f041d0 /common/modelresult.h | |
parent | ef205affdb73bfdbef5830996e6336e583660fbc (diff) | |
download | sink-8d5684292ef92f32487ba32df716a00c4a0841b5.tar.gz sink-8d5684292ef92f32487ba32df716a00c4a0841b5.zip |
Loading data with the new model for the test client
Diffstat (limited to 'common/modelresult.h')
-rw-r--r-- | common/modelresult.h | 6 |
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); |