summaryrefslogtreecommitdiffstats
path: root/common/datastorequery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/datastorequery.cpp')
-rw-r--r--common/datastorequery.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp
index dacc8ab..9e61a3d 100644
--- a/common/datastorequery.cpp
+++ b/common/datastorequery.cpp
@@ -345,11 +345,14 @@ public:
345 callback({entity, Sink::Operation_Removal}); 345 callback({entity, Sink::Operation_Removal});
346 }); 346 });
347 347
348 //add new result 348 //If the last item has been removed, then there's nothing to add
349 mSelectedValues.insert(reductionValueBa, selectionResult.selection); 349 if (!selectionResult.selection.isEmpty()) {
350 readEntity(selectionResult.selection, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 350 //add new result
351 callback({entity, Sink::Operation_Creation, selectionResult.aggregateValues, selectionResult.aggregateIds}); 351 mSelectedValues.insert(reductionValueBa, selectionResult.selection);
352 }); 352 readEntity(selectionResult.selection, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
353 callback({entity, Sink::Operation_Creation, selectionResult.aggregateValues, selectionResult.aggregateIds});
354 });
355 }
353 } 356 }
354 } 357 }
355 } 358 }