#include <TNaming_Builder.hxx>
#include <TNaming_NamedShape.hxx>
#include <TopoDS_Shape.hxx>
+#include <TDF_ChildIterator.hxx>
#include <GeomAPI_Shape.h>
Model_ResultBody::Model_ResultBody()
TDF_Label& aShapeLab = aData->shapeLab();
// remove the previous history
clean();
- aShapeLab.ForgetAllAttributes();
+ aShapeLab.ForgetAttribute(TNaming_NamedShape::GetID());
+ for(TDF_ChildIterator anIter(aShapeLab); anIter.More(); anIter.Next()) {
+ anIter.Value().ForgetAllAttributes();
+ }
// store the new shape as primitive
TNaming_Builder aBuilder(aShapeLab);
if (!theShape)
std::pair<std::string, std::string>& aPlugin = myPlugins[theFeatureID]; // plugin and doc kind
if (!aPlugin.second.empty() && aPlugin.second != activeDocument()->kind()) {
Events_Error::send(
- string("Feature '") + theFeatureID + "' can not be created in document '"
+ string("Feature '") + theFeatureID + "' can be created only in document '"
+ aPlugin.second + "' by the XML definition");
return FeaturePtr();
}