]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSetPlugin/PartSetPlugin_Part.cpp
Salome HOME
Fixes for issue #1936, issue #1956, issue #2035. Undo of Part delete restores the...
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Part.cpp
index 9c358dd7f2211a941863660d64204c6a9d6129f2..df8b645109bd5d87b6315a15134a99cb5bc9ac66 100644 (file)
@@ -107,3 +107,12 @@ bool PartSetPlugin_Part::isSub(ObjectPtr theObject) const
 void PartSetPlugin_Part::removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature)
 {
 }
+
+void PartSetPlugin_Part::erase() {
+  ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
+  if (aResult.get()) {
+    DocumentPtr aDoc = aResult->partDoc();
+    aDoc->eraseAllFeatures();
+  }
+  ModelAPI_Feature::erase();
+}