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

@@ -866,7 +866,7 @@ private:
} else {
throw Py::TypeError("Expects argument of type DocumentObject, Shape, or Geometry");
}
Part::Feature *pcFeature = static_cast<Part::Feature*>(pcDoc->addObject("Part::Feature", name));
Part::Feature *pcFeature = pcDoc->addObject<Part::Feature>(name);
// copy the data
pcFeature->Shape.setValue(shape);
pcFeature->purgeTouched();