From ffd1c8f0ed5e498850f7f13627a2dcf62a7606eb Mon Sep 17 00:00:00 2001 From: Merydian Date: Mon, 13 Nov 2023 13:20:29 +0100 Subject: [PATCH 1/4] Remove blue lines when clicking on routing_fromline_clear button --- ORStools/gui/ORStoolsDialog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 2ed5ebe6..ccc7004c 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -505,10 +505,11 @@ def _on_clear_listwidget_click(self): self.routing_fromline_list.clear() self._clear_annotations() - def _linetool_annotate_point(self, point, idx, crs=None): - if not crs: - crs = self._iface.mapCanvas().mapSettings().destinationCrs() + # Remove blue lines (rubber band) + if self.line_tool: + self.line_tool.canvas.scene().removeItem(self.line_tool.rubberBand) + def _linetool_annotate_point(self, point, idx): annotation = QgsTextAnnotation() c = QTextDocument() From 8066d2b66c7ad3127237c52c484987c833c75cd4 Mon Sep 17 00:00:00 2001 From: Merydian Date: Mon, 27 Nov 2023 10:03:32 +0100 Subject: [PATCH 2/4] docs: add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6abf4e54..c151e4c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ RELEASING: - Add styling of routing output in main plugin ([#149](https://github.com/GIScience/orstools-qgis-plugin/issues/149)) - make items in centroid list drag and droppable ([#144](https://github.com/GIScience/orstools-qgis-plugin/issues/144)) - Add save button for vertices ([#144](https://github.com/GIScience/orstools-qgis-plugin/issues/144)) +- remove blue lines every time the red X button is clicked ([#120](https://github.com/GIScience/orstools-qgis-plugin/issues/120)) ## [1.6.0] - 2023-07-25 From 0efe2d274f3edfe47b4fc20958cd63f9b5842148 Mon Sep 17 00:00:00 2001 From: Merydian Date: Wed, 6 Dec 2023 12:57:57 +0100 Subject: [PATCH 3/4] fix: remove blue lines when initiating linetool --- ORStools/gui/ORStoolsDialog.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index ccc7004c..8b4096a7 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -534,6 +534,10 @@ def _clear_annotations(self): def _on_linetool_init(self): """Hides GUI dialog, inits line maptool and add items to line list box.""" + # Remove blue lines (rubber band) + if self.line_tool: + self.line_tool.canvas.scene().removeItem(self.line_tool.rubberBand) + self.hide() self.routing_fromline_list.clear() # Remove all annotations which were added (if any) From 814ee20b7f02e7cf8023e876d2b0239d7747eb7e Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Fri, 22 Dec 2023 09:38:45 +0100 Subject: [PATCH 4/4] fix: remove merge-errors --- ORStools/gui/ORStoolsDialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 8b4096a7..baeb6619 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -509,7 +509,10 @@ def _on_clear_listwidget_click(self): if self.line_tool: self.line_tool.canvas.scene().removeItem(self.line_tool.rubberBand) - def _linetool_annotate_point(self, point, idx): + def _linetool_annotate_point(self, point, idx, crs=None): + if not crs: + crs = self._iface.mapCanvas().mapSettings().destinationCrs() + annotation = QgsTextAnnotation() c = QTextDocument()