Skip to content

Commit

Permalink
fix issue #5: ensure valid CRS returned from QgsProjectionSelectionDi…
Browse files Browse the repository at this point in the history
…alog
  • Loading branch information
iona5 committed Dec 22, 2020
1 parent cf43c8d commit e43a19b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e43a19b

Please sign in to comment.