- aResList.append(*aIt);
-
- foreach (ModuleBase_ViewerPrs aPrs, aSelected) {
- if ((!aResList.contains(aPrs.object())) && (aPrs.object() != aFeature))
+ aCurrentFeatureResults.append(*aIt);
+ }
+
+ if (aCurrentFeatureResults.empty()) /// filtering of selection is not necessary
+ setPreselection(thePreSelected);
+ else { // create preselection list without results of current feature
+ QList<ModuleBase_ViewerPrsPtr> aPreSelected;
+ foreach (ModuleBase_ViewerPrsPtr aPrs, thePreSelected) {
+ if ((!aCurrentFeatureResults.contains(aPrs->object())) && (aPrs->object() != aFeature))