[PartDesign] Chamfer and Fillet, select all edges for the user when no subobjects have been selected prior to executing command

This commit is contained in:
mwganson
2022-01-03 23:02:00 -06:00
committed by Uwe
parent dd651d5dc3
commit 977b602469

View File

@@ -1911,6 +1911,21 @@ bool dressupGetSelected(Gui::Command* cmd, const std::string& which,
return false;
}
// if 1 Part::Feature object selected, but no subobjects, select all edges for the user
if (selection[0].getSubNames().size() == 0){
int count = TopShape.countSubElements("Edge");
std::string docName = App::GetApplication().getDocumentName(base->getDocument());
std::string objName = base->getNameInDocument();
for (int ii = 0; ii < count; ii++){
std::ostringstream edgeName;
edgeName << "Edge" << ii+1;
Gui::Selection().addSelection(docName.c_str(), objName.c_str(), edgeName.str().c_str());
}
selection = cmd->getSelection().getSelectionEx();
if (selection.size() == 1){
selected = selection[0];
}
}
return true;
}