- if (!aShape.IsNull()) {
- if (aShape.ShapeType() == TopAbs_VERTEX) { // a point is selected
- const TopoDS_Vertex& aVertex = TopoDS::Vertex(aShape);
- if (!aVertex.IsNull()) {
- aPoint = BRep_Tool::Pnt(aVertex);
- PartSet_Tools::convertTo2D(aPoint, sketch(), theView, aX, anY);
- PartSet_Tools::setConstraints(sketch(), feature(), myActiveWidget->attributeID(), aX, anY);
- }
- } else if (aShape.ShapeType() == TopAbs_EDGE) { // a line is selected
- PartSet_Tools::convertTo2D(aPoint, sketch(), theView, aX, anY);
- }
+ if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE) { // a line is selected
+ PartSet_Tools::convertTo2D(aPoint, sketch(), aView, aX, anY);