diff --git a/coordinator.py b/coordinator.py index e9d5ec3..4afc74b 100644 --- a/coordinator.py +++ b/coordinator.py @@ -275,10 +275,17 @@ def setWarningMessage(self, message): def openCrsSelectionDialogForSection(self, section): projSelector = QgsProjectionSelectionDialog() if(projSelector.exec()): + selectedCrs = projSelector.crs() + + # workaround for checking if there was no CRS selected + # but user clicked 'OK': check if authid-string is empty: + if not selectedCrs.authid() : + return + if section == CoordinatorDockWidget.SectionInput: - self.setInputCrs(projSelector.crs()) + self.setInputCrs(selectedCrs) elif section == CoordinatorDockWidget.SectionOutput: - self.setOutputCrs(projSelector.crs()) + self.setOutputCrs(selectedCrs) def setOutputCrsToCanvasCrs(self): crs = self.canvas.mapSettings().destinationCrs() diff --git a/metadata.txt b/metadata.txt index 2826c9e..34fb947 100644 --- a/metadata.txt +++ b/metadata.txt @@ -25,6 +25,7 @@ repository=https://github.com/iona5/coordinator changelog=0.4 - pull request 16: use default values when capturing points (thanks @AlexanderFinkbeiner) - fix capture with wrong coordinate system with Point geometry + - ensure a valid CRS is selected when changing through QgsProjectionSelectionDialog (issue #5) 0.3 - issue #2: make sure capture tool is deselected when user selects another tool - issue #12: negative coordinates in geodetic systems were not properly processed