diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-29 10:35:38 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-12-29 10:35:38 +0100 |
commit | 93250cfa247e223ea37f5ede29615b5a2969d8b0 (patch) | |
tree | 8e3da5242d46a8dc1c3abdd0117552977da66945 /common | |
parent | 5a62f6ef857ef98812dd6ca30bc1e1049ccbf2ae (diff) | |
download | sink-93250cfa247e223ea37f5ede29615b5a2969d8b0.tar.gz sink-93250cfa247e223ea37f5ede29615b5a2969d8b0.zip |
Fixed removal of entity
Diffstat (limited to 'common')
-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); |