src/editmodes/abstractEditMode.cpp

changeset 941
f895379d7fab
parent 933
f4c80d92e71e
equal deleted inserted replaced
940:edc716c1d8e1 941:f895379d7fab
98 98
99 if ((data.releasedButtons & Qt::MidButton) and (m_drawedVerts.size() < 4) and (not data.mouseMoved)) 99 if ((data.releasedButtons & Qt::MidButton) and (m_drawedVerts.size() < 4) and (not data.mouseMoved))
100 { 100 {
101 // Find the closest vertex to our cursor 101 // Find the closest vertex to our cursor
102 double minimumDistance = 1024.0; 102 double minimumDistance = 1024.0;
103 const Vertex* closest = null; 103 const Vertex* closest = nullptr;
104 Vertex cursorPosition = renderer()->coordconv2_3 (data.ev->pos(), false); 104 Vertex cursorPosition = renderer()->coordconv2_3 (data.ev->pos(), false);
105 QPoint cursorPosition2D (data.ev->pos()); 105 QPoint cursorPosition2D (data.ev->pos());
106 const Axis relZ = renderer()->getRelativeZ(); 106 const Axis relZ = renderer()->getRelativeZ();
107 QVector<Vertex> vertices = renderer()->document()->inlineVertices(); 107 QVector<Vertex> vertices = renderer()->document()->inlineVertices();
108 108
140 minimumDistance = distanceSquared; 140 minimumDistance = distanceSquared;
141 closest = &vrt; 141 closest = &vrt;
142 } 142 }
143 } 143 }
144 144
145 if (closest != null) 145 if (closest != nullptr)
146 addDrawnVertex (*closest); 146 addDrawnVertex (*closest);
147 147
148 return true; 148 return true;
149 } 149 }
150 150

mercurial