Salome HOME
Task #3223: Improve Python dump readability
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Dumper.cpp
index 5352af49710ce0f43dc4e4116c758aae69d034f0..cf359fc6559acb4db1150315cb56120237fd05cc 100644 (file)
@@ -1060,6 +1060,16 @@ bool ModelHighAPI_Dumper::isDefaultTransparency(const ResultPtr& theResult) cons
   return fabs(anAttribute->value()) < 1.e-12;
 }
 
+bool ModelHighAPI_Dumper::dumpCommentBeforeFeature(const FeaturePtr& theFeature) const
+{
+  // currently, the comment should not be dumped only before the filters
+  FiltersFeaturePtr aFilters = std::dynamic_pointer_cast<ModelAPI_FiltersFeature>(theFeature);
+  if (aFilters)
+    return false;
+  // all other features should be commented before the dump
+  return true;
+}
+
 ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const char theChar)
 {
   *myDumpStorage << theChar;