Skip to content

Commit

Permalink
fix: error with canvas when deleting selected vertices in list
Browse files Browse the repository at this point in the history
Co-authored-by: Jakob Schnell <Jakob.Schnell@heigit.org>
  • Loading branch information
merydian and koebi authored Oct 29, 2024
1 parent 8687fe3 commit 7cf2825
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ RELEASING:
-->

## Unreleased

### Fixed
- Error with canvas scenes when deleting selected vertices in list ([#278](https://github.com/GIScience/orstools-qgis-plugin/pull/278))
-
### Added
- Processing algorithms for the Network Export endpoint ([#210](https://github.com/GIScience/orstools-qgis-plugin/issues/210))

Expand Down
2 changes: 1 addition & 1 deletion ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def _on_clear_listwidget_click(self) -> None:
self._clear_annotations()

# Remove blue lines (rubber band)
if self.line_tool:
if self.line_tool and hasattr(self.line_tool, "rubberBand"):
self.line_tool.canvas.scene().removeItem(self.line_tool.rubberBand)

def _linetool_annotate_point(
Expand Down
1 change: 1 addition & 0 deletions ORStools/utils/maptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def canvasDoubleClickEvent(self, e):
# noinspection PyUnresolvedReferences
self.doubleClicked.emit()
self.canvas.scene().removeItem(self.rubberBand)
del self.rubberBand

def deactivate(self):
super(LineTool, self).deactivate()
Expand Down

0 comments on commit 7cf2825

Please sign in to comment.