Skip to content

Commit 159a004

Browse files
author
timlinux
committed
Formatting changes only
git-svn-id: http://svn.osgeo.org/qgis/trunk@8752 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ea06083 commit 159a004

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/app/qgsmaptooledit.cpp

+31-31
Original file line numberDiff line numberDiff line change
@@ -39,41 +39,41 @@ int QgsMapToolEdit::insertSegmentVerticesForSnap(const QList<QgsSnappingResult>&
3939
QgsPoint layerPoint;
4040

4141
if(!editedLayer || !editedLayer->isEditable())
42-
{
43-
return 1;
44-
}
42+
{
43+
return 1;
44+
}
4545

4646
//transform snaping coordinates to layer crs first
4747
QList<QgsSnappingResult> transformedSnapResults = snapResults;
4848
QList<QgsSnappingResult>::iterator it = transformedSnapResults.begin();
4949
for(; it != transformedSnapResults.constEnd(); ++it)
50-
{
51-
QgsPoint layerPoint = toLayerCoords(editedLayer, it->snappedVertex);
52-
it->snappedVertex = layerPoint;
53-
}
50+
{
51+
QgsPoint layerPoint = toLayerCoords(editedLayer, it->snappedVertex);
52+
it->snappedVertex = layerPoint;
53+
}
5454

5555
return editedLayer->insertSegmentVerticesForSnap(transformedSnapResults);
5656
}
5757

5858
QgsPoint QgsMapToolEdit::snapPointFromResults(const QList<QgsSnappingResult>& snapResults, const QPoint& screenCoords)
5959
{
6060
if(snapResults.size() < 1)
61-
{
62-
return toMapCoords(screenCoords);
63-
}
61+
{
62+
return toMapCoords(screenCoords);
63+
}
6464
else
65-
{
66-
return snapResults.constBegin()->snappedVertex;
67-
}
65+
{
66+
return snapResults.constBegin()->snappedVertex;
67+
}
6868
}
6969

7070
QgsRubberBand* QgsMapToolEdit::createRubberBand(bool isPolygon)
7171
{
7272
QSettings settings;
7373
QgsRubberBand* rb = new QgsRubberBand(mCanvas, isPolygon);
7474
QColor color( settings.value("/qgis/digitizing/line_color_red", 255).toInt(),
75-
settings.value("/qgis/digitizing/line_color_green", 0).toInt(),
76-
settings.value("/qgis/digitizing/line_color_blue", 0).toInt());
75+
settings.value("/qgis/digitizing/line_color_green", 0).toInt(),
76+
settings.value("/qgis/digitizing/line_color_blue", 0).toInt());
7777
rb->setColor(color);
7878
rb->setWidth(settings.value("/qgis/digitizing/line_width", 1).toInt());
7979
rb->show();
@@ -84,39 +84,39 @@ QgsVectorLayer* QgsMapToolEdit::currentVectorLayer()
8484
{
8585
QgsMapLayer* currentLayer = mCanvas->currentLayer();
8686
if(!currentLayer)
87-
{
88-
return 0;
89-
}
87+
{
88+
return 0;
89+
}
9090

9191
QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer*>(currentLayer);
9292
if(!vlayer)
93-
{
94-
return 0;
95-
}
93+
{
94+
return 0;
95+
}
9696
return vlayer;
9797
}
9898

9999

100100
int QgsMapToolEdit::addTopologicalPoints(const QList<QgsPoint>& geom)
101101
{
102102
if(!mCanvas)
103-
{
104-
return 1;
105-
}
103+
{
104+
return 1;
105+
}
106106

107107
//find out current vector layer
108108
QgsVectorLayer *vlayer = currentVectorLayer();
109-
109+
110110
if (!vlayer)
111-
{
112-
return 2;
113-
}
111+
{
112+
return 2;
113+
}
114114

115115
QList<QgsPoint>::const_iterator list_it = geom.constBegin();
116116
for(; list_it != geom.constEnd(); ++list_it)
117-
{
118-
vlayer->addTopologicalPoints(*list_it);
119-
}
117+
{
118+
vlayer->addTopologicalPoints(*list_it);
119+
}
120120
return 0;
121121
}
122122

0 commit comments

Comments
 (0)