]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2311: Application crashes after change parameter
authorazv <azv@opencascade.com>
Sun, 26 Nov 2017 15:18:05 +0000 (18:18 +0300)
committerazv <azv@opencascade.com>
Sun, 26 Nov 2017 15:18:05 +0000 (18:18 +0300)
Intelligent dump of the "Copy" feature: dump only the feature which has produced the "Copy".

src/ModelHighAPI/ModelHighAPI_Dumper.cpp

index 84f4eb55653604cf50e7140e754ac4151dbb8789..b7211a4c76e21747ceb3fac65e280cb85ce70762 100644 (file)
@@ -962,18 +962,19 @@ ModelHighAPI_Dumper& operator<<(ModelHighAPI_Dumper& theDumper,
     else {
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
       theDumper.dumpFeature(aFeature, true);
-      // dump all referred features for the "Copy"
+      // dump the Projection feature which produces this "Copy" entity
       AttributeBooleanPtr aCopyAttr = aFeature->boolean("Copy");
       if (aCopyAttr.get() && aCopyAttr->value())
       {
         const std::set<AttributePtr>& aRefs = aFeature->data()->refsToMe();
         std::set<AttributePtr>::iterator aRefIt = aRefs.begin();
         for (; aRefIt != aRefs.end(); ++aRefIt)
-        {
-          FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
-          if (anOwner && !theDumper.isDumped(anOwner))
-            theDumper.dumpFeature(anOwner, true);
-        }
+          if ((*aRefIt)->id() == "ProjectedFeature")
+          { // process projection only
+            FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
+            if (anOwner && !theDumper.isDumped(anOwner))
+              theDumper.dumpFeature(anOwner, true);
+          }
       }
     }
   }