Skip to content

Commit

Permalink
ogr: don't create spatial index for shapes after deletes. That was su…
Browse files Browse the repository at this point in the history
…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 cf7e016
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/core/qgsvectorlayereditbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )

QgsFields oldFields = L->pendingFields();

bool hadPendingDeletes = !mDeletedFeatureIds.isEmpty();

//
// delete attributes
//
Expand Down Expand Up @@ -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:" );
Expand Down

0 comments on commit cf7e016

Please sign in to comment.