Skip to content
Permalink
Browse files
ogr: don't create spatial index for shapes after deletes. That was su…
…pposed to

also run a repack and doesn't work without (fixes #10483, refs #8317, refs #8822)
  • Loading branch information
jef-n committed Jun 13, 2014
1 parent 75f8269 commit cf7e016be9fe36f4b83eec22d2798aefc016790b
Showing with 0 additions and 9 deletions.
  1. +0 −9 src/core/qgsvectorlayereditbuffer.cpp
@@ -245,8 +245,6 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )

QgsFields oldFields = L->pendingFields();

bool hadPendingDeletes = !mDeletedFeatureIds.isEmpty();

//
// delete attributes
//
@@ -504,13 +502,6 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
}
}

// for shapes run a REPACK after each transaction
// TODO: enhance provider interface to allow moving this there
if ( success && hadPendingDeletes && L->providerType() == "ogr" && L->storageType() == "ESRI Shapefile" )
{
provider->createSpatialIndex();
}

if ( !success && provider->hasErrors() )
{
commitErrors << tr( "\n Provider errors:" );

0 comments on commit cf7e016

Please sign in to comment.