[TD]allow centerline deletion with Del

This commit is contained in:
wandererfan
2023-09-21 10:25:09 -04:00
committed by WandererFan
parent 455fd3b2e5
commit 68f79e06ae
3 changed files with 27 additions and 6 deletions

View File

@@ -1642,8 +1642,19 @@ bool DrawUtil::isCosmeticEdge(App::DocumentObject* owner, std::string element)
{
auto ownerView = static_cast<TechDraw::DrawViewPart*>(owner);
auto edge = ownerView->getEdge(element);
if (edge) {
return edge->getCosmetic();
if (edge && edge->source() == 1 && edge->getCosmetic()) {
return true;
}
return false;
}
// true if owner->element is a center line
bool DrawUtil::isCenterLine(App::DocumentObject* owner, std::string element)
{
auto ownerView = static_cast<TechDraw::DrawViewPart*>(owner);
auto edge = ownerView->getEdge(element);
if (edge && edge->source() == 2 && edge->getCosmetic()) {
return true;
}
return false;
}