From f95980526b9267b69cdc1c09aed2d0cf8f2421ca Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 10 Feb 2022 23:01:35 +0300 Subject: [PATCH] [bos #24514] fix regressions Make it possible again to select the whole feature in group. --- src/CollectionPlugin/CollectionPlugin_Validators.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CollectionPlugin/CollectionPlugin_Validators.cpp b/src/CollectionPlugin/CollectionPlugin_Validators.cpp index 2a96b71f0..4ef082fa1 100644 --- a/src/CollectionPlugin/CollectionPlugin_Validators.cpp +++ b/src/CollectionPlugin/CollectionPlugin_Validators.cpp @@ -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; -- 2.30.2