]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_AttributeSelection.cpp
Salome HOME
Fix for the issue #19039 Can't select solids to create a compound
[modules/shaper.git] / src / Model / Model_AttributeSelection.cpp
index 9f93e1e92acd843eb811c4df5ad5b42c837b2f35..6cd4958d2f525fa7fe19c2b90d11a29ef6a20661 100644 (file)
@@ -1987,6 +1987,8 @@ ResultPtr Model_AttributeSelection::newestContext(
   const ResultPtr theCurrent, const GeomShapePtr theValue)
 {
   ResultPtr aResult = theCurrent;
+  if (!std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult).get())
+    return aResult; // construction, groups and other results are not propagated (#19019)
   GeomShapePtr aSelectedShape = theValue.get() ? theValue : theCurrent->shape();
   std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());