Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsonc committed Dec 30, 2015
1 parent 4ca08a3 commit f94bb6f
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/plugins/georeferencer/qgsmapcoordsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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() );
}

Expand All @@ -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;
Expand Down

0 comments on commit f94bb6f

Please sign in to comment.