@@ -72,6 +72,7 @@ void QgsGeometryCollectionV2::clear()
72
72
qDeleteAll ( mGeometries );
73
73
mGeometries .clear ();
74
74
mWkbType = QgsWKBTypes::Unknown;
75
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
75
76
}
76
77
77
78
int QgsGeometryCollectionV2::numGeometries () const
@@ -105,6 +106,7 @@ bool QgsGeometryCollectionV2::addGeometry( QgsAbstractGeometryV2* g )
105
106
}
106
107
107
108
mGeometries .append ( g );
109
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
108
110
return true ;
109
111
}
110
112
@@ -116,6 +118,7 @@ bool QgsGeometryCollectionV2::insertGeometry( QgsAbstractGeometryV2 *g, int inde
116
118
}
117
119
118
120
mGeometries .insert ( index , g );
121
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
119
122
return true ;
120
123
}
121
124
@@ -127,6 +130,7 @@ bool QgsGeometryCollectionV2::removeGeometry( int nr )
127
130
}
128
131
delete mGeometries [nr];
129
132
mGeometries .remove ( nr );
133
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
130
134
return true ;
131
135
}
132
136
@@ -152,6 +156,7 @@ void QgsGeometryCollectionV2::transform( const QgsCoordinateTransform& ct, QgsCo
152
156
{
153
157
( *it )->transform ( ct, d );
154
158
}
159
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
155
160
}
156
161
157
162
void QgsGeometryCollectionV2::transform ( const QTransform& t )
@@ -161,6 +166,7 @@ void QgsGeometryCollectionV2::transform( const QTransform& t )
161
166
{
162
167
( *it )->transform ( t );
163
168
}
169
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
164
170
}
165
171
166
172
#if 0
@@ -211,6 +217,7 @@ bool QgsGeometryCollectionV2::fromWkb( const unsigned char * wkb )
211
217
{
212
218
mGeometries [i] = geometryList.at ( i );
213
219
}
220
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
214
221
215
222
return true ;
216
223
}
0 commit comments