summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/datastorequery.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp
index 4c25710..aca4bb1 100644
--- a/common/datastorequery.cpp
+++ b/common/datastorequery.cpp
@@ -359,9 +359,12 @@ public:
359 //Redo the reduction to find new aggregated values 359 //Redo the reduction to find new aggregated values
360 auto selectionResult = reduceOnValue(reductionValue); 360 auto selectionResult = reduceOnValue(reductionValue);
361 361
362 //If mSelectedValues did not contain the value, oldSelectionResult will be empty.(Happens if entites have been filtered)
362 auto oldSelectionResult = mSelectedValues.take(reductionValueBa); 363 auto oldSelectionResult = mSelectedValues.take(reductionValueBa);
363 SinkTraceCtx(mDatastore->mLogCtx) << "Old selection result: " << oldSelectionResult << " New selection result: " << selectionResult.selection; 364 SinkTraceCtx(mDatastore->mLogCtx) << "Old selection result: " << oldSelectionResult << " New selection result: " << selectionResult.selection;
364 if (oldSelectionResult == selectionResult.selection) { 365 if (selectionResult.selection.isEmpty() && oldSelectionResult.isEmpty()) {
366 //Nothing to do, the item was filtered before, and still is.
367 } else if (oldSelectionResult == selectionResult.selection) {
365 mSelectedValues.insert(reductionValueBa, selectionResult.selection); 368 mSelectedValues.insert(reductionValueBa, selectionResult.selection);
366 Q_ASSERT(!selectionResult.selection.isEmpty()); 369 Q_ASSERT(!selectionResult.selection.isEmpty());
367 readEntity(selectionResult.selection, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 370 readEntity(selectionResult.selection, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
@@ -369,7 +372,6 @@ public:
369 }); 372 });
370 } else { 373 } else {
371 //remove old result 374 //remove old result
372 //If mSelectedValues did not containthe value, oldSelectionResult will be empty.(Happens if entites have been filtered)
373 if (!oldSelectionResult.isEmpty()) { 375 if (!oldSelectionResult.isEmpty()) {
374 readEntity(oldSelectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 376 readEntity(oldSelectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
375 callback({entity, Sink::Operation_Removal}); 377 callback({entity, Sink::Operation_Removal});