Skip to content

Commit

Permalink
fix: TypeError if no SVGPaths are set (#212)
Browse files Browse the repository at this point in the history
Users may not have SVG Paths set, which leads to the Error described.
  • Loading branch information
koebi authored Jan 15, 2024
1 parent b68be1e commit f895374
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ RELEASING:
13. Create new release in GitHub with tag version and release title of `vX.X.X`
-->

## Unreleased

### Fixed
- TypeError if no SVGPaths are set ([#212](https://github.com/GIScience/orstools-qgis-plugin/issues/212))

## [1.7.0] - 2023-12-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def run_gui_control(self):

# add ors svg path
my_new_path = os.path.join(basepath, "img/svg")
svg_paths = QSettings().value("svg/searchPathsForSVG")
svg_paths = QSettings().value("svg/searchPathsForSVG") or []
if my_new_path not in svg_paths:
svg_paths.append(my_new_path)
QSettings().setValue("svg/searchPathsForSVG", svg_paths)
Expand Down

0 comments on commit f895374

Please sign in to comment.