95 double minimumDistance = 1024.0; |
95 double minimumDistance = 1024.0; |
96 const Vertex* closest = null; |
96 const Vertex* closest = null; |
97 Vertex cursorPosition = renderer()->coordconv2_3 (data.ev->pos(), false); |
97 Vertex cursorPosition = renderer()->coordconv2_3 (data.ev->pos(), false); |
98 QPoint cursorPosition2D (data.ev->pos()); |
98 QPoint cursorPosition2D (data.ev->pos()); |
99 const Axis relZ = renderer()->getRelativeZ(); |
99 const Axis relZ = renderer()->getRelativeZ(); |
100 QVector<Vertex> vertices; |
100 QVector<Vertex> vertices = renderer()->document()->inlineVertices(); |
101 |
|
102 for (auto it = renderer()->document()->vertices().begin(); |
|
103 it != renderer()->document()->vertices().end(); |
|
104 ++it) |
|
105 { |
|
106 vertices << it.key(); |
|
107 } |
|
108 |
101 |
109 // Sort the vertices in order of distance to camera |
102 // Sort the vertices in order of distance to camera |
110 std::sort (vertices.begin(), vertices.end(), [&](const Vertex& a, const Vertex& b) -> bool |
103 std::sort (vertices.begin(), vertices.end(), [&](const Vertex& a, const Vertex& b) -> bool |
111 { |
104 { |
112 if (renderer()->getFixedCamera (renderer()->camera()).negatedDepth) |
105 if (renderer()->getFixedCamera (renderer()->camera()).negatedDepth) |