]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/CollectionPlugin/CollectionPlugin_Validators.cpp
Salome HOME
[bos #24514] fix regressions
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_Validators.cpp
index 2a96b71f07fe4a1cd48da155fbd6b21d371d33ba..4ef082fa1490c0bbcd5e24abecaa7fa08cdb52f0 100644 (file)
@@ -115,7 +115,9 @@ bool CollectionPlugin_GroupSelectionValidator::isValid(
 
   for (int anIndex = 0; anIndex < aSelList->size(); ++anIndex) {
     AttributeSelectionPtr aCurSelection = aSelList->value(anIndex);
-    ResultPtr aGroupResult = aCurSelection->context();
+    FeaturePtr aCurFeature = aCurSelection->contextFeature();
+    ResultPtr aGroupResult = aCurFeature.get() ? aCurFeature->lastResult()
+                                               : aCurSelection->context();
     if (!aGroupResult.get() || aGroupResult->groupName() == ModelAPI_ResultGroup::group()) {
       theError = "Error: Whole group mustn't be selected.";
       return false;