]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #19039 Can't select solids to create a compound
authormpv <mikhail.ponikarov@opencascade.com>
Wed, 6 May 2020 13:45:16 +0000 (16:45 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Wed, 6 May 2020 13:45:16 +0000 (16:45 +0300)
and the issue #19019 Python dump not loadable

src/Model/Model_AttributeSelection.cpp
src/Model/Model_Update.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());
index 40c5fe191954fed275bb80d37f2f56dacda02f4d..052468c7845d62c84ebfaae62300e2ae508063fd 100644 (file)
@@ -735,14 +735,6 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
       }
       if (aDoExecute) {
         executeFeature(theFeature);
-        // Tuleap issue #19019: when loading python dump several wires are referred to the same
-        // sketch edge. First wire is concealed by another feature, but the flag is not initialized
-        // for the result. When the next wire is created, it finds wire as a referred feature
-        // instead of sketch edge.
-        // As a result, call synchronization to initialize the concealed flag.
-        Model_Objects* aDocObjects =
-            std::dynamic_pointer_cast<Model_Document>(theFeature->document())->objects();
-        aDocObjects->synchronizeBackRefs();
       } else {
         // store information that this feature must be executed later
         theFeature->data()->execState(ModelAPI_StateMustBeUpdated);