Commit a842c1a4 authored by Aleksey Kontsevich's avatar Aleksey Kontsevich

Keep vertex selection on vertex remove

parent 7cbbf378
......@@ -311,7 +311,11 @@ void QGCMapPolygon::removeVertex(int vertexIndex)
QObject* coordObj = _polygonModel.removeAt(vertexIndex);
coordObj->deleteLater();
selectVertex(-1);
if(vertexIndex == _selectedVertexIndex) {
selectVertex(-1);
} else if (vertexIndex < _selectedVertexIndex) {
selectVertex(_selectedVertexIndex - 1);
} // else do nothing - keep current selected vertex
_polygonPath.removeAt(vertexIndex);
emit pathChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment