101 double minimumDistance = 1024.0; |
101 double minimumDistance = 1024.0; |
102 const Vertex* closest = nullptr; |
102 const Vertex* closest = nullptr; |
103 Vertex cursorPosition = renderer()->convert2dTo3d (data.ev->pos(), false); |
103 Vertex cursorPosition = renderer()->convert2dTo3d (data.ev->pos(), false); |
104 QPoint cursorPosition2D (data.ev->pos()); |
104 QPoint cursorPosition2D (data.ev->pos()); |
105 const Axis relZ = renderer()->getRelativeZ(); |
105 const Axis relZ = renderer()->getRelativeZ(); |
106 QVector<Vertex> vertices = renderer()->document()->inlineVertices(); |
106 QList<Vertex> vertices = renderer()->document()->inlineVertices().toList(); |
107 |
107 |
108 // Sort the vertices in order of distance to camera |
108 // Sort the vertices in order of distance to camera |
109 std::sort (vertices.begin(), vertices.end(), [&](const Vertex& a, const Vertex& b) -> bool |
109 std::sort (vertices.begin(), vertices.end(), [&](const Vertex& a, const Vertex& b) -> bool |
110 { |
110 { |
111 if (renderer()->getFixedCamera (renderer()->camera()).negatedDepth) |
111 if (renderer()->getFixedCamera (renderer()->camera()).negatedDepth) |