Skip to content
Permalink
Browse files

Fix indentation

  • Loading branch information
simonsonc committed Dec 30, 2015
1 parent 4ca08a3 commit f94bb6ffc74387408dd64151965bd57ee9e79c26
Showing with 21 additions and 21 deletions.
  1. +21 −21 src/plugins/georeferencer/qgsmapcoordsdialog.h
@@ -37,19 +37,19 @@ class QgsGeorefMapToolEmitPoint : public QgsMapTool

virtual ~QgsGeorefMapToolEmitPoint()
{
delete mSnappingMarker;
mSnappingMarker = nullptr;
delete mSnappingMarker;
mSnappingMarker = nullptr;
}

void canvasMoveEvent(QgsMapMouseEvent *e) override
void canvasMoveEvent( QgsMapMouseEvent *e ) override
{
MappedPoint mapped = mapPoint(e);
MappedPoint mapped = mapPoint( e );

if ( !mapped.snapped )
{
delete mSnappingMarker;
mSnappingMarker = nullptr;
}
if ( !mapped.snapped )
{
delete mSnappingMarker;
mSnappingMarker = nullptr;
}
else
{
if ( !mSnappingMarker )
@@ -65,7 +65,7 @@ class QgsGeorefMapToolEmitPoint : public QgsMapTool

void canvasPressEvent( QgsMapMouseEvent * e ) override
{
MappedPoint mapped = mapPoint(e);
MappedPoint mapped = mapPoint( e );
emit canvasClicked( mapped.point, e->button() );
}

@@ -90,20 +90,20 @@ class QgsGeorefMapToolEmitPoint : public QgsMapTool
private:
struct MappedPoint
{
QgsPoint point;
bool snapped = false;
QgsPoint point;
bool snapped = false;
};

MappedPoint mapPoint(QMouseEvent *e)
MappedPoint mapPoint( QMouseEvent *e )
{
QgsPoint pnt = toMapCoordinates( e->pos() );
QgsSnappingUtils* snappingUtils = canvas()->snappingUtils();
auto match = snappingUtils->snapToMap( pnt );

MappedPoint ret;
ret.snapped = match.isValid();
ret.point = ret.snapped ? match.point() : pnt;
return ret;
QgsPoint pnt = toMapCoordinates( e->pos() );
QgsSnappingUtils* snappingUtils = canvas()->snappingUtils();
auto match = snappingUtils->snapToMap( pnt );

MappedPoint ret;
ret.snapped = match.isValid();
ret.point = ret.snapped ? match.point() : pnt;
return ret;
}

QgsVertexMarker* mSnappingMarker = nullptr;

0 comments on commit f94bb6f

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