From 977b602469aebad6e63db5a1334e3c327a24db9b Mon Sep 17 00:00:00 2001 From: mwganson Date: Mon, 3 Jan 2022 23:02:00 -0600 Subject: [PATCH] [PartDesign] Chamfer and Fillet, select all edges for the user when no subobjects have been selected prior to executing command --- src/Mod/PartDesign/Gui/Command.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 7303531e09..0d9612d8a3 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -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; }