@@ -410,25 +410,25 @@ void QgsMapToolNodeTool::createTopologyRubberBands()
410
410
}
411
411
// Get VertexId of snapped vertex
412
412
QgsVertexId vid;
413
- if ( !feature.geometry ()->vertexIdFromVertexNr ( snapResult.snappedVertexNr , vid ) )
413
+ if ( !feature.constGeometry ()->vertexIdFromVertexNr ( snapResult.snappedVertexNr , vid ) )
414
414
{
415
415
continue ;
416
416
}
417
417
// Add rubberband if not already added
418
418
if ( !mMoveRubberBands .contains ( snapFeatureId ) )
419
419
{
420
- QgsGeometryRubberBand* rb = new QgsGeometryRubberBand ( mCanvas , feature.geometry ()->type () );
420
+ QgsGeometryRubberBand* rb = new QgsGeometryRubberBand ( mCanvas , feature.constGeometry ()->type () );
421
421
rb->setOutlineColor ( Qt::blue );
422
422
rb->setBrushStyle ( Qt::NoBrush );
423
423
rb->setOutlineWidth ( 2 );
424
- QgsAbstractGeometryV2* rbGeom = feature.geometry ()->geometry ()->clone ();
424
+ QgsAbstractGeometryV2* rbGeom = feature.constGeometry ()->geometry ()->clone ();
425
425
if ( mCanvas ->mapSettings ().layerTransform ( vlayer ) )
426
426
rbGeom->transform ( *mCanvas ->mapSettings ().layerTransform ( vlayer ) );
427
427
rb->setGeometry ( rbGeom );
428
428
mMoveRubberBands .insert ( snapFeatureId, rb );
429
429
}
430
430
// Add to list of vertices to be moved
431
- mMoveVertices [snapFeatureId].append ( qMakePair ( vid, toMapCoordinates ( vlayer, feature.geometry ()->geometry ()->vertexAt ( vid ) ) ) );
431
+ mMoveVertices [snapFeatureId].append ( qMakePair ( vid, toMapCoordinates ( vlayer, feature.constGeometry ()->geometry ()->vertexAt ( vid ) ) ) );
432
432
}
433
433
}
434
434
}
0 commit comments