]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[bos #24514] fix regressions
authorazv <azv@opencascade.com>
Thu, 10 Feb 2022 20:01:35 +0000 (23:01 +0300)
committerazv <azv@opencascade.com>
Thu, 10 Feb 2022 20:01:35 +0000 (23:01 +0300)
Make it possible again to select the whole feature in group.

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;