diff --git a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp index 779a6c11c8..fd7cf45d19 100644 --- a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp @@ -363,7 +363,9 @@ App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::st // TODO Replace it with commands (2015-09-11, Fat-Zer) if(obj->isDerivedFrom(Part::Datum::getClassTypeId())) { copy = App::GetApplication().getActiveDocument()->addObject( - obj->getClassTypeId().getName(), name.c_str() ); + obj->getTypeId().getName(), name.c_str() ); + + assert(copy->isDerivedFrom(Part::Datum::getClassTypeId())); //we need to reference the individual datums and make again datums. This is important as //datum adjust their size dependent on the part size, hence simply copying the shape is