PD: make Loft working again when two sketches are pre-selected

This commit is contained in:
wmayer
2021-12-13 10:32:40 +01:00
parent 7db38c0e78
commit 2b65ef8fcf

View File

@@ -1042,9 +1042,16 @@ void prepareProfileBased(PartDesign::Body *pcActiveBody, Gui::Command* cmd, cons
for (std::vector<Gui::SelectionObject>::size_type ii = 1; ii < selection.size(); ii++) {
// Add subvalues even for sketches in case we just want points
auto objCmdSection = Gui::Command::getObjectCmd(selection[ii].getObject());
const auto& subnames = selection[ii].getSubNames();
std::ostringstream ss;
for (auto &s : selection[ii].getSubNames())
ss << "'" << s << "',";
if (!subnames.empty()) {
for (auto &s : subnames)
ss << "'" << s << "',";
}
else {
// an empty string indicates the whole object
ss << "''";
}
FCMD_OBJ_CMD(Feat, "Sections += [(" << objCmdSection << ", [" << ss.str() << "])]");
}
}