-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qgsvectorlayer: Properly invalidate extent cache on feature deletion
This change is similar to the previous commit on feature addition. When a feature is removed from a `QgsVectorLayer` `QgsVectorLayer::deleteFeature` is called. This function makes mostly 2 things in case of a successful operation: 1. it calls `QgsVectorLayerEditBuffer::deleteFeature` which itself will emit the `QgsVectorLayerEditBuffer::featureDeleted` signal. Finally, `QgsVectorLayer` listend to this signal to directly emit the `QgsVectorLayer::featureDeleted` signal 2. Call `QgsVectorLayer::updateExtents()` to invalidate the cache of the extent In practice, this means that the `QgsVectorLayer::featureDeleted` signal may be emitted before the cache of the extent is invalidated. This can cause some issues. This issue is solved by calling `updateExtents()` before emitting the `featureDeleted` signal.
- Loading branch information
1 parent
544b506
commit bdaff94
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters