From: mpv Date: Wed, 6 May 2020 16:21:37 +0000 (+0300) Subject: Another fix for the issue #19039 Can't select solids to create a compound X-Git-Tag: V9_5_0b1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9c4b35a016268243a43e9b8d3393eff03070c53;p=modules%2Fshaper.git Another fix for the issue #19039 Can't select solids to create a compound and the issue #19019 Python dump not loadable --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 6cd4958d2..e5a333e35 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -1987,8 +1987,6 @@ ResultPtr Model_AttributeSelection::newestContext( const ResultPtr theCurrent, const GeomShapePtr theValue) { ResultPtr aResult = theCurrent; - if (!std::dynamic_pointer_cast(aResult).get()) - return aResult; // construction, groups and other results are not propagated (#19019) GeomShapePtr aSelectedShape = theValue.get() ? theValue : theCurrent->shape(); std::shared_ptr aDoc = std::dynamic_pointer_cast(owner()->document()); @@ -2074,6 +2072,10 @@ ResultPtr Model_AttributeSelection::newestContext( break; } } + if (!aFindNewContext && !aResults.empty()) { + // #19019 : result is concealed by object that contains no such sub-shape + return theCurrent; + } } } }