TD: replace usage of raw pointers of Vertex and Face with shared pointers.
This fixes issue 4741: Broken File After Using Landmark Dimension in TechDraw
This commit is contained in:
@@ -1094,7 +1094,7 @@ void execLine2Points(Gui::Command* cmd)
|
||||
if (!vertexNames.empty()) {
|
||||
for (auto& v2d: vertexNames) {
|
||||
int idx = DrawUtil::getIndexFromName(v2d);
|
||||
TechDraw::Vertex* v = baseFeat->getProjVertexByIndex(idx);
|
||||
TechDraw::VertexPtr v = baseFeat->getProjVertexByIndex(idx);
|
||||
if (v) {
|
||||
Base::Vector3d p = DrawUtil::invertY(v->pnt);
|
||||
points.push_back(p / scale);
|
||||
@@ -1213,7 +1213,7 @@ void CmdTechDrawCosmeticEraser::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
} else if (geomType == "Vertex") {
|
||||
TechDraw::Vertex* tdv = objFeat->getProjVertexByIndex(idx);
|
||||
TechDraw::VertexPtr tdv = objFeat->getProjVertexByIndex(idx);
|
||||
if (tdv != nullptr) {
|
||||
std::string delTag = tdv->cosmeticTag;
|
||||
if (!delTag.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user