diff --git a/CHANGELOG.md b/CHANGELOG.md index c358d77..af2b135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 4d6a4c7..06c38c8 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -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( diff --git a/ORStools/utils/maptools.py b/ORStools/utils/maptools.py index 9088ddd..76b05ba 100644 --- a/ORStools/utils/maptools.py +++ b/ORStools/utils/maptools.py @@ -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()