Skip to content

Commit 7cf2825

Browse files
merydiankoebi
andauthored
fix: error with canvas when deleting selected vertices in list
Co-authored-by: Jakob Schnell <Jakob.Schnell@heigit.org>
1 parent 8687fe3 commit 7cf2825

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ RELEASING:
4141
-->
4242

4343
## Unreleased
44+
45+
### Fixed
46+
- Error with canvas scenes when deleting selected vertices in list ([#278](https://github.com/GIScience/orstools-qgis-plugin/pull/278))
47+
-
4448
### Added
4549
- Processing algorithms for the Network Export endpoint ([#210](https://github.com/GIScience/orstools-qgis-plugin/issues/210))
4650

ORStools/gui/ORStoolsDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def _on_clear_listwidget_click(self) -> None:
579579
self._clear_annotations()
580580

581581
# Remove blue lines (rubber band)
582-
if self.line_tool:
582+
if self.line_tool and hasattr(self.line_tool, "rubberBand"):
583583
self.line_tool.canvas.scene().removeItem(self.line_tool.rubberBand)
584584

585585
def _linetool_annotate_point(

ORStools/utils/maptools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def canvasDoubleClickEvent(self, e):
9292
# noinspection PyUnresolvedReferences
9393
self.doubleClicked.emit()
9494
self.canvas.scene().removeItem(self.rubberBand)
95+
del self.rubberBand
9596

9697
def deactivate(self):
9798
super(LineTool, self).deactivate()

0 commit comments

Comments
 (0)