QGIS
QGIS copied to clipboard
[Layer dependencies] Emit QgsVectorLayer::dataChanged on commitChanges
Description
Fixes #57784 where even if the layer is checked as a dependency layer, there is no reloading of data when the layer is saved.
With this change, the dataChanged signal is emitted on commitChanges, so that when a feature is externally modified on save (database trigger for example) we have index and cache reconstruction.
Related PRs:
- https://github.com/qgis/QGIS/pull/37475
- https://github.com/qgis/QGIS/pull/41463
This change is kind of following this particular comment/discussion https://github.com/qgis/QGIS/pull/41463#issuecomment-777094703
See the tests explaining the multiple emissions of dataChanged
.
Ping @suricactus @m-kuhn @MorriganR @troopa81 @3nids for review