Mod: Use new addObject<T>(...) using regex

This commit is contained in:
Benjamin Nauck
2025-01-19 01:49:04 +01:00
parent 0712b481e9
commit a1c5767643
57 changed files with 125 additions and 159 deletions

View File

@@ -132,7 +132,7 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
//}
Part::Feature *pcFeature;
pcFeature = static_cast<Part::Feature*>(pcDoc->addObject("Part::Feature", name.c_str()));
pcFeature = pcDoc->addObject<Part::Feature>(name.c_str());
pcFeature->Shape.setValue(aSolid);
// This is a trick to access the GUI via Python and set the color property
@@ -167,7 +167,7 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
// name += ws->Model()->StringLabel(ent)->ToCString();
//}
Part::Feature *pcFeature = static_cast<Part::Feature*>(pcDoc->addObject("Part::Feature", name.c_str()));
Part::Feature *pcFeature = pcDoc->addObject<Part::Feature>(name.c_str());
pcFeature->Shape.setValue(aShell);
}