New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layers in a custom projection are not refreshed when the projection definition is changed #40704
Comments
@fuzzysolutions can you attach a sample layer, thanks. |
I'm not sure this is a bug as people are not expected to change crs definition. This might be more of a feature request. I'd guess that one definition change you'd have to go through and the layer using this crs and replace it with the new definition. Otherwise the layers still use their internal 'outdated' definition. |
@gioman Load that Layer, create a user defined CRS according to the definition below and redefine the layer on that CRS (the layer first carries its definition in its own). Then change the FALSE EASTING / FALSE NORTHING parameters in the user-defined CRS and see that nothing happens. test layer user-defined CRS.zip
|
@roya0045: Yes, while creating the example layer, I better understood to use the "Test" widget below the custom CRS definition. So the importance is not high. Still, I think not updating the layer is a kind of unexpected behavior, so to me it is a bug. I think it's already valuable for others that the behavior is now in some way documented here. |
@fuzzysolutions 100% agreed |
My workaround after a CRS edit is to set the layer's CRS to something else, then back to the edited CRS. You do not have to close and reload the whole project in that case. It might be nice if you could just click on the greyed-out current CRS under |
to QgsApplication In the long term all methods for retrieving available CRS details should be moved here (instead of being scattered all over the place, as they are now). But for now the logic for saving and updating user CRS definitions has been moved here only. The initial motivation is to create a central place where objects can connect to in order to listen for when a user makes changes to their custom projections. Refs qgis#40704
…ferenceSystem object Updates the definition and parameters of the coordinate reference system to their latest values. This only has an effect if the CRS is a user defined custom CRS, and the definition of that custom CRS has changed. In this case the parameters of the object (such as the proj and WKT string definitions, and other related properties) will be updated to reflect the current definition of the custom CRS. Any objects which store CRS objects should connect to the QgsApplication::coordinateReferenceSystemRegistry()'s QgsCoordinateReferenceSystemRegistry::userCrsChanged() signal and call this method on their stored CRS objects whenever the signal is emitted in order to update these CRSes to their new definitions. Refs qgis#40704
to QgsApplication In the long term all methods for retrieving available CRS details should be moved here (instead of being scattered all over the place, as they are now). But for now the logic for saving and updating user CRS definitions has been moved here only. The initial motivation is to create a central place where objects can connect to in order to listen for when a user makes changes to their custom projections. Refs #40704
…ferenceSystem object Updates the definition and parameters of the coordinate reference system to their latest values. This only has an effect if the CRS is a user defined custom CRS, and the definition of that custom CRS has changed. In this case the parameters of the object (such as the proj and WKT string definitions, and other related properties) will be updated to reflect the current definition of the custom CRS. Any objects which store CRS objects should connect to the QgsApplication::coordinateReferenceSystemRegistry()'s QgsCoordinateReferenceSystemRegistry::userCrsChanged() signal and call this method on their stored CRS objects whenever the signal is emitted in order to update these CRSes to their new definitions. Refs #40704
Describe the bug
When I have a layer in a custom projection and I change the projection definition, e.g. edit the false easting parameter, there is no repaint triggered for the existing layer. I need to close and reload the project to get the layer displayed according to the new projection definition.
How to Reproduce
QGIS and OS versions
The text was updated successfully, but these errors were encountered: