Skip to content

Commit

Permalink
SHP: Fix unreported issue with spatialindex
Browse files Browse the repository at this point in the history
When the spatialindex did not exist and it is created
when the file is in edit mode the spatialindex was not
recreated when editing finshed.

Followup: #53186
  • Loading branch information
elpaso committed Feb 15, 2024
1 parent 6e12197 commit 918e5a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,8 @@ bool QgsOgrProvider::createSpatialIndexImpl()

QFileInfo fi( mFilePath ); // to get the base name
//find out, if the .qix file is there
return QFileInfo::exists( fi.path().append( '/' ).append( fi.completeBaseName() ).append( ".qix" ) );
mShapefileHadSpatialIndex = QFileInfo::exists( fi.path().append( '/' ).append( fi.completeBaseName() ).append( ".qix" ) );
return mShapefileHadSpatialIndex;
}
else if ( mGDALDriverName == QLatin1String( "GPKG" ) ||
mGDALDriverName == QLatin1String( "SQLite" ) )
Expand Down

0 comments on commit 918e5a2

Please sign in to comment.