Skip to content

Commit

Permalink
fix: stop qgis crashing when selecting more than two annotations for …
Browse files Browse the repository at this point in the history
…deletion (#234)


Co-authored-by: Jakob Schnell <Jakob.Schnell@heigit.org>
  • Loading branch information
merydian and koebi authored Apr 26, 2024
1 parent 53963ee commit bffa119
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ RELEASING:

## Unreleased

### Added
- Add support for decimal ranges with isochrones([#237](https://github.com/GIScience/orstools-qgis-plugin/issues/237))

### Fixed
- QGis crashes when selecting more than two vertices for deletion ([#230](https://github.com/GIScience/orstools-qgis-plugin/issues/230))
- Vertices on canvas not depicted fully with n having more than one digit in length ([#235](https://github.com/GIScience/orstools-qgis-plugin/issues/235))

### Added
- Add support for decimal ranges with isochrones([#237](https://github.com/GIScience/orstools-qgis-plugin/issues/237))

## [1.7.1] - 2024-01-15

### Added
Expand Down
6 changes: 3 additions & 3 deletions ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ def _on_clear_listwidget_click(self):
"""Clears the contents of the QgsListWidget and the annotations."""
items = self.routing_fromline_list.selectedItems()
if items:
rows = [self.routing_fromline_list.row(item) for item in items]
# if items are selected, only clear those
for item in items:
row = self.routing_fromline_list.row(item)
self.routing_fromline_list.takeItem(row)
for row in sorted(rows, reverse=True):
if self.annotations:
self.project.annotationManager().removeAnnotation(self.annotations.pop(row))
self.routing_fromline_list.takeItem(row)
else:
# else clear all items and annotations
self.routing_fromline_list.clear()
Expand Down

0 comments on commit bffa119

Please sign in to comment.