Fix #9792: PD tasks fail to launch if body is inside Part and activated

introduced by PR #9557
This commit is contained in:
Adrián Insaurralde Avalos
2023-07-09 00:48:00 -04:00
committed by 0penBrain
parent 8d87eaac22
commit c09ef943f7

View File

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