File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,12 @@ bool QgsOgrProvider::setSubsetString( QString theSQL )
246
246
}
247
247
setDataSourceUri ( uri );
248
248
249
+ OGR_L_ResetReading ( ogrLayer );
250
+
251
+ // getting the total number of features in the layer
252
+ // TODO: This can be expensive, do we really need it!
253
+ featuresCounted = OGR_L_GetFeatureCount ( ogrLayer, TRUE );
254
+
249
255
// get the extent_ (envelope) of the layer
250
256
QgsDebugMsg ( " Starting get extent" );
251
257
@@ -254,10 +260,6 @@ bool QgsOgrProvider::setSubsetString( QString theSQL )
254
260
255
261
QgsDebugMsg ( " Finished get extent" );
256
262
257
- // getting the total number of features in the layer
258
- // TODO: This can be expensive, do we really need it!
259
- featuresCounted = OGR_L_GetFeatureCount ( ogrLayer, TRUE );
260
-
261
263
// check the validity of the layer
262
264
QgsDebugMsg ( " checking validity" );
263
265
loadFields ();
You can’t perform that action at this time.
0 commit comments