Skip to content

Commit 3f53b33

Browse files
committedNov 14, 2011
Merge branch 'master' of github.com:qgis/Quantum-GIS
2 parents e54680d + f0839fb commit 3f53b33

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎src/app/qgsmaptoolnodetool.cpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,12 @@ QgsFeature* SelectionFeature::feature()
11781178
void SelectionFeature::createVertexMapPolygon()
11791179
{
11801180
int y = 0;
1181-
if ( !mFeature->geometry()->asPolygon().empty() )
1181+
QgsPolygon polygon = mFeature->geometry()->asPolygon();
1182+
if ( !polygon.empty() )
11821183
{ //polygon
1183-
for ( int i2 = 0; i2 < mFeature->geometry()->asPolygon().size(); i2++ )
1184+
for ( int i2 = 0; i2 < polygon.size(); i2++ )
11841185
{
1185-
QgsPolyline poly = mFeature->geometry()->asPolygon()[i2];
1186+
const QgsPolyline& poly = polygon[i2];
11861187
int i;
11871188
for ( i = 0; i < poly.size(); i++ )
11881189
{
@@ -1205,12 +1206,13 @@ void SelectionFeature::createVertexMapPolygon()
12051206
}
12061207
else //multipolygon
12071208
{
1208-
for ( int i2 = 0; i2 < mFeature->geometry()->asMultiPolygon().size(); i2++ )
1209+
QgsMultiPolygon multiPolygon = mFeature->geometry()->asMultiPolygon();
1210+
for ( int i2 = 0; i2 < multiPolygon.size(); i2++ )
12091211
{ //iterating through polygons
1210-
QgsPolygon poly2 = mFeature->geometry()->asMultiPolygon()[i2];
1212+
const QgsPolygon& poly2 = multiPolygon[i2];
12111213
for ( int i3 = 0; i3 < poly2.size(); i3++ )
12121214
{ //iterating through polygon rings
1213-
QgsPolyline poly = poly2[i3];
1215+
const QgsPolyline& poly = poly2[i3];
12141216
int i;
12151217
for ( i = 0; i < poly.size(); i++ )
12161218
{

0 commit comments

Comments
 (0)
Please sign in to comment.