PD: in ViewProviderLoft::highlightSection follow the same logic as in Loft::execute for selected profiles/sections

This commit is contained in:
wmayer
2021-12-14 00:30:59 +01:00
parent a853d80c73
commit 2d9c403cc0

View File

@@ -125,8 +125,12 @@ void ViewProviderLoft::highlightSection(bool on)
PartDesign::Loft* pcLoft = static_cast<PartDesign::Loft*>(getObject());
auto sections = pcLoft->Sections.getSubListValues();
for (auto it : sections) {
if (it.second.size() == 1 && it.second[0].empty())
// only take the entire shape when we have a sketch selected, but
// not a point of the sketch
auto subName = it.second.empty() ? "" : it.second.front();
if (it.first->isDerivedFrom(Part::Part2DObject::getClassTypeId()) && subName.compare(0, 6, "Vertex") != 0) {
it.second.clear();
}
highlightReferences(dynamic_cast<Part::Feature*>(it.first), it.second, on);
}
}