Skip to content
Permalink
Browse files

Migrate geometry fixers to new API style

  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent 391d3f9 commit fff743bed84749695a1c52d8521f123b32a1d318
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/gui/qgsmaptooladvanceddigitizing.cpp
@@ -18,6 +18,7 @@
#include "qgsmapcanvas.h"
#include "qgsadvanceddigitizingdockwidget.h"
#include "qgsvectorlayer.h"
#include "qgsgeometryfixes.h"

QgsMapToolAdvancedDigitizing::QgsMapToolAdvancedDigitizing( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget )
: QgsMapToolEdit( canvas )
@@ -42,7 +43,7 @@ void QgsMapToolAdvancedDigitizing::canvasPressEvent( QgsMapMouseEvent *e )
QgsVectorLayer *layer = currentVectorLayer();
if ( mSnapToGridEnabled && layer )
{
e->snapToGrid( layer->geometryOptions().geometryPrecision, layer->crs() );
e->snapToGrid( layer->geometryFixes()->geometryPrecision(), layer->crs() );
}

cadCanvasPressEvent( e );
@@ -82,7 +83,7 @@ void QgsMapToolAdvancedDigitizing::canvasReleaseEvent( QgsMapMouseEvent *e )
QgsVectorLayer *layer = currentVectorLayer();
if ( mSnapToGridEnabled && layer )
{
e->snapToGrid( layer->geometryOptions().geometryPrecision, layer->crs() );
e->snapToGrid( layer->geometryFixes()->geometryPrecision(), layer->crs() );
}

cadCanvasReleaseEvent( e );
@@ -107,7 +108,7 @@ void QgsMapToolAdvancedDigitizing::canvasMoveEvent( QgsMapMouseEvent *e )
QgsVectorLayer *layer = currentVectorLayer();
if ( mSnapToGridEnabled && layer )
{
e->snapToGrid( layer->geometryOptions().geometryPrecision, layer->crs() );
e->snapToGrid( layer->geometryFixes()->geometryPrecision(), layer->crs() );
}

cadCanvasMoveEvent( e );

0 comments on commit fff743b

Please sign in to comment.
You can’t perform that action at this time.