Skip to content

Commit

Permalink
fix(qgsfeaturepool): better synchronization between cache and spatial…
Browse files Browse the repository at this point in the history
… index
  • Loading branch information
Djedouas committed Aug 27, 2024
1 parent 57fce5a commit 2912ca6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/analysis/vector/geometry_checker/qgsfeaturepool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ bool QgsFeaturePool::getFeature( QgsFeatureId id, QgsFeature &feature )
}
locker.changeMode( QgsReadWriteLocker::Write );
mFeatureCache.insert( id, new QgsFeature( feature ) );

//cleanup the index, in case the feature was evicted from the cache but is still in the index
mIndex.deleteFeature( id );
mIndex.addFeature( feature );
}
return true;
Expand Down

0 comments on commit 2912ca6

Please sign in to comment.