Skip to content

validate custom CRS definition when changing between CRs and warn user about invalid definition (fix #57806) - #66572

Merged
nyalldawson merged 1 commit into
qgis:masterfrom
alexbruy:custom-crs-validation
Jul 12, 2026
Merged

validate custom CRS definition when changing between CRs and warn user about invalid definition (fix #57806)#66572
nyalldawson merged 1 commit into
qgis:masterfrom
alexbruy:custom-crs-validation

Conversation

@alexbruy

Copy link
Copy Markdown
Contributor

Description

When user changes custom CRS definition to invalid, then selects another custom CRS in the list and returns back to the previously changed CRS, the definition string will be lost.

This is because we update custom CRS definition when current item changes and do not check if CRS created from the definition is valid.

To prevent silent lost of definition we check validity of the CRS, warn user if it is invalid and block changing to another CRS.

Fixes #57806.

AI tool usage

  • AI tool(s) (Copilot, Claude, or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. Failure to be honest might result in banning.
@github-actions github-actions Bot added this to the 4.2.0 milestone Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
To execute locally, unzip the downloaded zip file and run bin\qgis-bin.exe in the extracted directory.
You might be prompted by Windows Defender click "Run anyway"
(Built from commit 7aeb99c)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit 7aeb99c)

Comment thread src/app/options/qgscustomprojectionoptions.cpp Outdated
@alexbruy alexbruy closed this Jul 2, 2026
@alexbruy alexbruy reopened this Jul 2, 2026
@alexbruy
alexbruy force-pushed the custom-crs-validation branch from 3749d5b to 7aeb99c Compare July 12, 2026 06:22
@nyalldawson
nyalldawson merged commit bf28115 into qgis:master Jul 12, 2026
30 checks passed
@alexbruy
alexbruy deleted the custom-crs-validation branch July 13, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants