This commit is contained in:
PaddleStroke
2024-11-21 09:28:22 +01:00
committed by Chris Hennes
parent e28286a2ef
commit 4a80af74f4

View File

@@ -89,12 +89,14 @@ bool setEdit(App::DocumentObject *obj, PartDesign::Body *body) {
return false;
App::DocumentObject *parent = nullptr;
std::string subname;
auto activeBody = activeView->getActiveObject<PartDesign::Body*>(PDBODYKEY);
auto activeBody = activeView->getActiveObject<PartDesign::Body*>(PDBODYKEY, &parent, &subname);
if (activeBody != body) {
parent = obj;
subname.clear();
}
else {
parent = getParent(obj, subname);
subname += obj->getNameInDocument();
subname += '.';
}
Gui::cmdGuiDocument(parent, std::ostringstream() << "setEdit("