[TD]allow cosmetic deletion via DEL
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#include "GeometryObject.h"
|
||||
#include "LineGroup.h"
|
||||
#include "Preferences.h"
|
||||
#include "DrawViewPart.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
@@ -1625,6 +1626,27 @@ std::string DrawUtil::translateArbitrary(std::string context, std::string baseNa
|
||||
return ssTranslated + suffix;
|
||||
}
|
||||
|
||||
// true if owner->element is a cosmetic vertex
|
||||
bool DrawUtil::isCosmeticVertex(App::DocumentObject* owner, std::string element)
|
||||
{
|
||||
auto ownerView = static_cast<TechDraw::DrawViewPart*>(owner);
|
||||
auto vertex = ownerView->getVertex(element);
|
||||
if (vertex) {
|
||||
return vertex->getCosmetic();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// true if owner->element is a cosmetic edge
|
||||
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();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//============================
|
||||
// various debugging routines.
|
||||
|
||||
Reference in New Issue
Block a user