From: azv Date: Sun, 26 Nov 2017 15:18:05 +0000 (+0300) Subject: Issue #2311: Application crashes after change parameter X-Git-Tag: V_2.10.0RC~139 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7d5ec8f561b3b18c6713db6d79cd8844c1767b8;p=modules%2Fshaper.git Issue #2311: Application crashes after change parameter Intelligent dump of the "Copy" feature: dump only the feature which has produced the "Copy". --- diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 84f4eb556..b7211a4c7 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -962,18 +962,19 @@ ModelHighAPI_Dumper& operator<<(ModelHighAPI_Dumper& theDumper, else { FeaturePtr aFeature = std::dynamic_pointer_cast(*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& aRefs = aFeature->data()->refsToMe(); std::set::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); + } } } }