From 0d730a28854d16859c99d809a54cc3ab25e81bfc Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 9 Oct 2019 11:53:51 +0300 Subject: [PATCH] Provide selection of features for invisible objects --- src/ModuleBase/ModuleBase_ISelection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ModuleBase/ModuleBase_ISelection.cpp b/src/ModuleBase/ModuleBase_ISelection.cpp index a44dd7d8a..635991721 100644 --- a/src/ModuleBase/ModuleBase_ISelection.cpp +++ b/src/ModuleBase/ModuleBase_ISelection.cpp @@ -57,6 +57,12 @@ ResultPtr ModuleBase_ISelection::getResult(const ModuleBase_ViewerPrsPtr& thePrs if (thePrs->object().get()) { ObjectPtr aObject = thePrs->object(); aResult = std::dynamic_pointer_cast(aObject); + if (!aResult.get()) { + FeaturePtr aFeature = std::dynamic_pointer_cast(aObject); + if (aFeature.get()) { + aResult = aFeature->firstResult(); + } + } } else if (!thePrs->owner().IsNull()) { ObjectPtr anObject = getSelectableObject(thePrs->owner()); -- 2.39.2