PartDesign: revert e49cfde and 7331dc3 to fix https://github.com/FreeCAD/FreeCAD/issues/17949
This commit is contained in:
committed by
Chris Hennes
parent
8e57726701
commit
598e32cdb3
@@ -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