diff options
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r-- | common/modelresult.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp index d13bba9..add84aa 100644 --- a/common/modelresult.cpp +++ b/common/modelresult.cpp | |||
@@ -289,6 +289,12 @@ template <class T, class Ptr> | |||
289 | void ModelResult<T, Ptr>::modify(const Ptr &value) | 289 | void ModelResult<T, Ptr>::modify(const Ptr &value) |
290 | { | 290 | { |
291 | auto childId = qHash(*value); | 291 | auto childId = qHash(*value); |
292 | if (!mEntities.contains(childId)) { | ||
293 | //Happens because the DatabaseQuery emits modifiations also if the item used to be filtered. | ||
294 | SinkTrace() << "Tried to modify a value that is not yet part of the model"; | ||
295 | add(value); | ||
296 | return; | ||
297 | } | ||
292 | auto id = parentId(value); | 298 | auto id = parentId(value); |
293 | // Ignore updates we get before the initial fetch is done | 299 | // Ignore updates we get before the initial fetch is done |
294 | if (!mEntityChildrenFetched.contains(id)) { | 300 | if (!mEntityChildrenFetched.contains(id)) { |