Part: [skip ci] use Gui::cmdAppDocumentArgs in ShapeFromMesh dialog

This commit is contained in:
wmayer
2021-10-03 16:46:32 +02:00
parent 06c6fecf2e
commit 5d8dce4fed

View File

@@ -81,7 +81,7 @@ void ShapeFromMesh::perform()
std::string mesh = (*it)->getNameInDocument();
std::string name = doc->getUniqueObjectName(mesh.c_str());
Gui::cmdAppDocument(doc, std::ostringstream() << "addObject(\"Part::Feature\", \"" << name << "\")");
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "Part::Feature", name);
std::string partObj = App::DocumentObjectT(doc, name).getObjectPython();
std::string meshObj = App::DocumentObjectT(doc, mesh).getObjectPython();