Commit 3f53b33 committed Nov 14, 2011 Unverified
File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1178,11 +1178,12 @@ QgsFeature* SelectionFeature::feature()
1178
1178
void SelectionFeature::createVertexMapPolygon ()
1179
1179
{
1180
1180
int y = 0 ;
1181
- if ( !mFeature ->geometry ()->asPolygon ().empty () )
1181
+ QgsPolygon polygon = mFeature ->geometry ()->asPolygon ();
1182
+ if ( !polygon.empty () )
1182
1183
{ // polygon
1183
- for ( int i2 = 0 ; i2 < mFeature -> geometry ()-> asPolygon () .size (); i2++ )
1184
+ for ( int i2 = 0 ; i2 < polygon .size (); i2++ )
1184
1185
{
1185
- QgsPolyline poly = mFeature -> geometry ()-> asPolygon () [i2];
1186
+ const QgsPolyline& poly = polygon [i2];
1186
1187
int i;
1187
1188
for ( i = 0 ; i < poly.size (); i++ )
1188
1189
{
@@ -1205,12 +1206,13 @@ void SelectionFeature::createVertexMapPolygon()
1205
1206
}
1206
1207
else // multipolygon
1207
1208
{
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++ )
1209
1211
{ // iterating through polygons
1210
- QgsPolygon poly2 = mFeature -> geometry ()-> asMultiPolygon () [i2];
1212
+ const QgsPolygon& poly2 = multiPolygon [i2];
1211
1213
for ( int i3 = 0 ; i3 < poly2.size (); i3++ )
1212
1214
{ // iterating through polygon rings
1213
- QgsPolyline poly = poly2[i3];
1215
+ const QgsPolyline& poly = poly2[i3];
1214
1216
int i;
1215
1217
for ( i = 0 ; i < poly.size (); i++ )
1216
1218
{
You can’t perform that action at this time.
0 commit comments