From f7d5ec8f561b3b18c6713db6d79cd8844c1767b8 Mon Sep 17 00:00:00 2001 From: azv Date: Sun, 26 Nov 2017 18:18:05 +0300 Subject: [PATCH] Issue #2311: Application crashes after change parameter Intelligent dump of the "Copy" feature: dump only the feature which has produced the "Copy". --- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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); + } } } } -- 2.39.2