diff options
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp index 95f4643..4295a44 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp | |||
@@ -318,7 +318,9 @@ template <class T, class Ptr> | |||
318 | void ModelResult<T, Ptr>::remove(const Ptr &value) | 318 | void ModelResult<T, Ptr>::remove(const Ptr &value) |
319 | { | 319 | { |
320 | auto childId = qHash(*value); | 320 | auto childId = qHash(*value); |
321 | auto id = parentId(value); | 321 | //The removed entity will have no properties, but we at least need the parent property. |
322 | auto actualEntity = mEntities.value(childId); | ||
323 | auto id = parentId(actualEntity); | ||
322 | auto parent = createIndexFromId(id); | 324 | auto parent = createIndexFromId(id); |
323 | SinkTraceCtx(mLogCtx) << "Removed entity" << childId; | 325 | SinkTraceCtx(mLogCtx) << "Removed entity" << childId; |
324 | auto index = mTree[id].indexOf(childId); | 326 | auto index = mTree[id].indexOf(childId); |