PartDesign: revert c09ef94 and a3c4f4b to fix https://github.com/FreeCAD/FreeCAD/issues/17949
This commit is contained in:
committed by
Chris Hennes
parent
e28286a2ef
commit
4a80af74f4
@@ -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("
|
||||
|
||||
Reference in New Issue
Block a user