Skip to content

Commit cf7e016

Browse files
committed
ogr: don't create spatial index for shapes after deletes. That was supposed to
also run a repack and doesn't work without (fixes #10483, refs #8317, refs #8822)
1 parent 75f8269 commit cf7e016

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/core/qgsvectorlayereditbuffer.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
245245

246246
QgsFields oldFields = L->pendingFields();
247247

248-
bool hadPendingDeletes = !mDeletedFeatureIds.isEmpty();
249-
250248
//
251249
// delete attributes
252250
//
@@ -504,13 +502,6 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
504502
}
505503
}
506504

507-
// for shapes run a REPACK after each transaction
508-
// TODO: enhance provider interface to allow moving this there
509-
if ( success && hadPendingDeletes && L->providerType() == "ogr" && L->storageType() == "ESRI Shapefile" )
510-
{
511-
provider->createSpatialIndex();
512-
}
513-
514505
if ( !success && provider->hasErrors() )
515506
{
516507
commitErrors << tr( "\n Provider errors:" );

0 commit comments

Comments
 (0)