Skip to content
Permalink
Browse files
Really delete deleted features in ogr provider (using REPACK)
git-svn-id: http://svn.osgeo.org/qgis/trunk@6821 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 19, 2007
1 parent a7abf02 commit a9c3b4051b1a75d6fb80279193c6d3073da81429
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -1005,7 +1005,13 @@ bool QgsOgrProvider::deleteFeatures(const QgsFeatureIds & id)
returnvalue=false;
}
}

ogrLayer->SyncToDisk();
QString filename=dataSourceUri().section('/',-1,-1);//find out the filename from the uri
QString layername=filename.section('.',0,0);
QString sql="REPACK " + layername;
ogrDataSource->ExecuteSQL(sql.toLocal8Bit().data(), NULL, NULL);

return returnvalue;
}

0 comments on commit a9c3b40

Please sign in to comment.