Skip to content

Commit

Permalink
Update swiss_locator_filter.py (#64)
Browse files Browse the repository at this point in the history
```
IndexError: list index out of range 
Traceback (most recent call last):
  File "python/plugins/swiss_locator/core/filters/swiss_locator_filter.py", line 193, in create_transforms
    self.crs = map_crs.authid().split(":")[1]
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
```
  • Loading branch information
m-kuhn authored Sep 19, 2023
1 parent 60506b5 commit 6805f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swiss_locator/core/filters/swiss_locator_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def create_transforms(self):
self.crs = self.settings.value("crs")
if self.crs == "project":
map_crs = self.map_canvas.mapSettings().destinationCrs()
if map_crs.isValid():
if map_crs.isValid() and ":" in map_crs.authid():
self.crs = map_crs.authid().split(":")[1]
if self.crs not in AVAILABLE_CRS:
self.crs = "2056"
Expand Down

0 comments on commit 6805f19

Please sign in to comment.